/* The ADO Local manual (website/manual/): long reading on the site's Studio materials. A sticky contents column
   beside one reading column; screenshots in the same windows as the tour; notes in a well, cautions in amber.
   Loaded after ../styles.css, whose tokens it uses; nothing here applies to the tour or the download page. */

.manual {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(32px, 5vw, 56px) var(--gutter) 0;
}

/* ── Contents ─────────────────────────────────────────────────────────────────────────────────── */

.toc {
  position: sticky;
  top: 84px;
  align-self: start;
  max-height: calc(100vh - 104px);
  overflow-y: auto;
  padding: 2px 6px 24px 2px;
  font-size: 14.5px;
  scrollbar-width: thin;
}

.toc summary {
  display: none;
}

.toc .toc-title {
  margin: 0 0 10px 10px;
  color: var(--quiet);
  font: 600 12px/1 var(--body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc a {
  display: block;
  padding: 6px 10px;
  border-radius: 7px;
  color: var(--ink-soft);
  text-decoration: none;
  line-height: 1.3;
}

.toc a:hover {
  background: var(--well);
  color: var(--ink);
}

.toc a[aria-current='page'] {
  background: var(--sel);
  color: var(--ink);
  font-weight: 600;
}

/* The chapter you're reading lists its sections; the one you've scrolled to is marked. */
.toc .sections {
  margin: 4px 0 8px 10px;
  padding-left: 10px;
  box-shadow: inset 1px 0 0 var(--rule);
}

.toc .sections a {
  padding: 4px 10px;
  font-size: 13.5px;
  color: var(--quiet);
}

.toc .sections a.here {
  color: var(--accent);
  font-weight: 600;
}

@media (max-width: 900px) {
  .manual {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .toc {
    position: static;
    max-height: none;
    overflow: visible;
    padding: 0;
  }
  .toc details {
    border-radius: 12px;
    background: var(--well);
    box-shadow: var(--shadow-well);
  }
  .toc summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
  }
  .toc summary::-webkit-details-marker {
    display: none;
  }
  .toc summary::after {
    content: '';
    width: 8px;
    height: 8px;
    border: solid var(--quiet);
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg) translateY(-2px);
  }
  .toc details[open] summary::after {
    transform: rotate(-135deg) translateY(-2px);
  }
  .toc details > div {
    padding: 0 8px 12px;
  }
  .toc .toc-title {
    display: none;
  }
}

/* ── Reading ──────────────────────────────────────────────────────────────────────────────────── */

.article {
  min-width: 0;
  max-width: 760px;
}

.article .crumb {
  margin: 0 0 10px;
  color: var(--quiet);
  font-size: 14px;
}

.article .crumb a {
  color: inherit;
}

.article h1 {
  margin: 0;
  font: 850 clamp(2.2rem, 5vw, 3.6rem) / 1.02 var(--display);
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.article .lede {
  margin: 18px 0 0;
  max-width: 60ch;
  text-align: left;
}

.article h2 {
  margin: 64px 0 0;
  padding-top: 28px;
  box-shadow: inset 0 1px 0 var(--rule);
  font: 760 1.65rem/1.15 var(--display);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.article h3 {
  margin: 34px 0 0;
  font: 650 18.5px/1.3 var(--body);
}

.article h4 {
  margin: 24px 0 0;
  font: 650 16px/1.3 var(--body);
}

.article h2 + p,
.article h3 + p,
.article h4 + p {
  margin-top: 10px;
}

.article p,
.article li {
  color: var(--ink-soft);
}

.article p {
  margin: 14px 0 0;
}

.article ul,
.article ol {
  margin: 12px 0 0;
  padding-left: 1.4em;
}

.article li + li {
  margin-top: 6px;
}

.article li::marker {
  color: var(--quiet);
}

.article strong {
  color: var(--ink);
  font-weight: 600;
}

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

.article code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--well);
  font: 500 0.88em var(--mono);
  color: var(--ink);
}

/* Numbered steps: each step's number on a raised indigo tile. */
.article ol.steps {
  counter-reset: step;
  padding: 0;
  list-style: none;
}

.article ol.steps > li {
  position: relative;
  padding-left: 40px;
  counter-increment: step;
}

.article ol.steps > li + li {
  margin-top: 12px;
}

.article ol.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  color: #fff;
  font: 650 13px/1 var(--body);
  font-variant-numeric: tabular-nums;
  background: linear-gradient(var(--plate-top), var(--plate-base));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 1px 3px -1px rgba(20, 24, 50, 0.35);
}

/* Key caps: the site's raised tiles at reading size. */
.article kbd,
.shortcuts kbd {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 5px;
  color: var(--ink);
  font: 500 12.5px/1 var(--body);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  vertical-align: 1px;
  background: linear-gradient(var(--tile-top), var(--tile-base));
  box-shadow: var(--shadow-tile);
}

/* A menu path or button name as it reads in the app. */
.article .ui {
  color: var(--ink);
  font-weight: 600;
}

/* Notes: a well; cautions (a connection, a token's scope, something Azure DevOps can't undo): amber. */
.note,
.caution {
  margin: 20px 0 0;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 15.5px;
}

.note {
  background: var(--sel);
}

.caution {
  background: var(--amber-wash);
}

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

.note .label,
.caution .label {
  display: block;
  margin-bottom: 2px;
  font: 650 12px/1.4 var(--body);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.note .label {
  color: var(--accent);
}

.caution .label {
  color: var(--amber);
}

.note p,
.caution p {
  margin: 6px 0 0;
}

/* ── Screenshots: the tour's window, at reading width ──────────────────────────────────────────── */

.shot {
  margin: 26px 0 0;
}

.shot .window {
  max-width: 100%;
}

/* Small windows (quick capture) and dialogs keep their own size rather than filling the column. */
.shot.small .window {
  max-width: 460px;
}

.shot figcaption {
  margin-top: 12px;
  color: var(--quiet);
  font-size: 14px;
  line-height: 1.45;
}

.shot img {
  cursor: zoom-in;
}

/* A screenshot opened full size: the dialog the page's script opens on a click. */
.zoom {
  max-width: min(96vw, 1440px);
  max-height: 96vh;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow-window);
}

.zoom::backdrop {
  background: rgba(10, 12, 30, 0.55);
  backdrop-filter: blur(4px);
}

.zoom img {
  width: auto;
  max-width: 100%;
  max-height: 96vh;
  cursor: zoom-out;
}

/* ── Contents page: a card for each chapter ───────────────────────────────────────────────────── */

.chapters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.chapters li + li {
  margin: 0;
}

.chapters a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 14px;
  height: 100%;
  padding: 18px;
  border-radius: 14px;
  color: var(--ink);
  text-decoration: none;
  background: linear-gradient(var(--panel), var(--panel-low));
  box-shadow: var(--shadow-float), inset 0 1px 0 var(--hi);
  transition: transform 160ms var(--ease);
}

.chapters a:hover {
  transform: translateY(-2px);
}

.chapters .glyph {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  color: var(--accent);
  background: linear-gradient(var(--tile-top), var(--tile-base));
  box-shadow: var(--shadow-tile);
}

.chapters strong {
  font: 700 17px/1.25 var(--body);
}

.chapters span:last-child {
  color: var(--quiet);
  font-size: 14.5px;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .chapters {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .chapters a {
    transition: none;
  }
}

/* ── Keyboard shortcuts: tables in wells ──────────────────────────────────────────────────────── */

.shortcuts {
  width: 100%;
  margin: 16px 0 0;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 12px;
  background: var(--well);
  box-shadow: var(--shadow-well);
  font-size: 15px;
}

.shortcuts th,
.shortcuts td {
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
}

.shortcuts thead th {
  color: var(--quiet);
  font: 600 12px/1.4 var(--body);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.shortcuts tbody tr + tr td,
.shortcuts tbody tr:first-child td {
  box-shadow: inset 0 1px 0 var(--rule);
}

.shortcuts td:first-child {
  width: 38%;
  white-space: nowrap;
}

.shortcuts td {
  color: var(--ink-soft);
}

@media (max-width: 560px) {
  .shortcuts td:first-child {
    white-space: normal;
  }
}

/* ── Previous and next chapter ────────────────────────────────────────────────────────────────── */

.pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 72px 0 0;
}

.pager a {
  display: block;
  padding: 16px 18px;
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
  background: var(--well);
  box-shadow: var(--shadow-well);
}

.pager a:hover {
  background: var(--sel);
}

.pager span {
  display: block;
  color: var(--quiet);
  font-size: 13px;
}

.pager strong {
  font-weight: 650;
}

.pager .next {
  grid-column: 2;
  text-align: right;
}
