/* The review site's own parts, on top of design/base.css and design/lesson/lesson.css.
   Rules for each part: design/rules.md, "Review site". Values come from tokens.css only. */

/* ---------- Top bar without search or account: the theme button sits at the end ---------- */

.topbar-gap { flex: 1; }

/* ---------- Sidebar additions ---------- */

.course-head a { color: inherit; text-decoration: none; }
.course-head a:hover { text-decoration: underline; text-decoration-color: var(--aiops-accent-line); text-underline-offset: 3px; }
.logo-tile.is-neutral { color: var(--aiops-text-muted); }

/* A lesson the syllabus lists but nobody has written: a plain row, no link */
.lesson-off {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 8px;
  color: var(--aiops-text-muted);
  font-size: 14px;
  line-height: 20px;
  cursor: default;
}
.lesson-off .n { flex: none; width: 18px; color: var(--aiops-text-faint); font-variant-numeric: tabular-nums; }
.lesson-off .t { flex: 1; text-wrap: pretty; }
.off-note { display: block; font-size: 12px; line-height: 16px; color: var(--aiops-text-muted); font-style: italic; }
@media (max-width: 859px) {
  .lesson-off { min-height: 40px; padding: 10px 8px; }
}

/* ---------- Prose the lesson example has no part for ---------- */

.prose h3:not(.step-title) {
  margin: 32px 0 10px;
  color: var(--aiops-text);
  font-size: 18px;
  line-height: 28px;
  font-weight: 600;
  text-wrap: balance;
  scroll-margin-top: calc(var(--bar-h) + 24px);
}
.prose h4 { margin: 24px 0 8px; color: var(--aiops-text); font-size: 16px; line-height: 26px; font-weight: 600; }
.prose ol:not(.steps, .flow, .diagram) { margin: 0 0 20px; padding-left: 22px; }
.prose li > ul, .prose li > ol:not(.steps, .flow, .diagram) { margin: 8px 0 0; }
.prose blockquote {
  margin: 0 0 20px;
  padding: 0 0 0 16px;
  border-left: 2px solid var(--aiops-border-strong);
}
.prose hr { margin: 32px 0; border: 0; border-top: 1px solid var(--aiops-border); }
.callout .logo { margin-top: 4px; }
.md-comment { color: var(--aiops-text-muted); font-family: var(--aiops-font-mono); font-size: 13px; }
.pager-gap { display: block; }
@media (max-width: 859px) { .pager-gap { display: none; } }

/* ---------- Section link: copy the address of a heading ---------- */

.prose a.anchor,
a.anchor {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: 0 0 0 4px;
  vertical-align: middle;
  border-radius: 8px;
  color: var(--aiops-text-muted);
  text-decoration: none;
  opacity: 0;
  transition: opacity 150ms ease, color 150ms ease, background-color 150ms ease;
}
h1:hover > .anchor, h2:hover > .anchor, h3:hover > .anchor, .anchor:focus-visible { opacity: 1; }
.prose a.anchor:hover, a.anchor:hover { color: var(--aiops-text); background: var(--aiops-hover); }
.anchor svg { width: 15px; height: 15px; }
@media (hover: none), (max-width: 859px) {
  .prose a.anchor, a.anchor { opacity: 1; color: var(--aiops-text-faint); }
}

.site-toast {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: 24px;
  padding: 8px 14px;
  border-radius: var(--aiops-radius-control);
  background: var(--aiops-surface);
  box-shadow: var(--aiops-shadow);
  color: var(--aiops-text);
  font-size: 13px;
  line-height: 20px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 6px);
  transition: opacity 160ms var(--aiops-ease), transform 160ms var(--aiops-ease);
}
.site-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Review only: what Machina reads and members never see ---------- */

.review-badge { vertical-align: 8px; }
@media (max-width: 859px) { .review-badge { vertical-align: 6px; } }

.review-only {
  margin: 48px 0 0;
  border: 1px dashed var(--aiops-border-strong);
  border-radius: var(--aiops-radius);
}
.review-only > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 16px;
  color: var(--aiops-text-muted);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  border-radius: var(--aiops-radius);
  transition: background-color 150ms ease, color 150ms ease;
}
.review-only > summary::-webkit-details-marker { display: none; }
.review-only > summary:hover { color: var(--aiops-text); background: var(--aiops-subtle); }
.review-only > summary:focus-visible { outline-offset: -2px; }
.review-only > summary svg { transition: transform 220ms var(--aiops-ease-move); }
.review-only[open] > summary svg { transform: rotate(90deg); }
.review-body { padding: 4px 20px 24px; border-top: 1px dashed var(--aiops-border-strong); }
.review-facts {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 6px 16px;
  margin: 16px 0 8px;
  font-size: 14px;
  line-height: 22px;
}
.review-facts dt { color: var(--aiops-text-muted); font-size: 13px; font-weight: 500; }
.review-facts dd { margin: 0; color: var(--aiops-text-body); }
.review-facts code, .review-body code { white-space: normal; overflow-wrap: anywhere; }
.review-body h2 { margin: 32px 0 12px; font-size: 20px; line-height: 28px; }
.review-missing { color: var(--aiops-text-muted); }
@media (max-width: 599px) {
  .review-body { padding: 4px 16px 20px; }
  .review-facts { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .review-facts dd { margin-bottom: 8px; }
}

/* ---------- One-column pages: start, library, glossary, shelves ---------- */

.page { padding: 40px 32px 96px; }
.page-inner { max-width: 760px; margin: 0 auto; }
.page h1 { margin: 0; }
.page-lead { margin: 12px 0 0; max-width: 640px; color: var(--aiops-text-body); font-size: 18px; line-height: 28px; text-wrap: pretty; }
.page-lead a, .taught a, .page-intro a, .hub-task td a {
  color: var(--aiops-text);
  text-decoration: underline;
  text-decoration-color: var(--aiops-accent-line);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
@media (max-width: 859px) {
  .page { padding: 28px 20px 72px; }
  .page-lead { font-size: 17px; line-height: 27px; }
}

/* Phone shelves: a row under the bar, as on the home page */
.page-shelves { display: none; }
@media (max-width: 859px) {
  .page-shelves {
    display: flex;
    gap: 2px;
    margin: -12px -10px 20px;
    padding: 0 0 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .page-shelves a {
    flex: none;
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 10px;
    border-radius: var(--aiops-radius-control);
    color: var(--aiops-text-muted);
    font-size: 14px;
    line-height: 20px;
    text-decoration: none;
    transition: color 150ms ease, background-color 150ms ease;
  }
  .page-shelves a:hover { color: var(--aiops-text); background: var(--aiops-subtle); }
  .page-shelves a[aria-current="page"] { color: var(--aiops-text); background: var(--aiops-hover); font-weight: 500; }
  body:has(.page) .topbar-inner { padding-left: 16px; }
}

/* A course on the start page: head, module labels, lesson rows */
.course-list { margin: 48px 0 0; }
.course-list-head { display: flex; align-items: center; gap: 12px; margin: 0 0 4px; }
.course-list-head .logo-tile {
  display: grid; place-items: center; flex: none;
  width: 32px; height: 32px; border-radius: 8px;
  box-shadow: inset 0 0 0 1px var(--aiops-border);
}
.course-list-head .logo-tile svg { width: 18px; height: 18px; }
.course-list-head h2, .more h2, .shelf h2 {
  margin: 0;
  color: var(--aiops-text);
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
  letter-spacing: -0.3px;
}
.course-list-head p { margin: 0; color: var(--aiops-text-muted); font-size: 14px; line-height: 20px; }
.course-list-head a { color: var(--aiops-text); text-decoration: underline; text-decoration-color: var(--aiops-accent-line); text-underline-offset: 3px; }
.course-list-head a:hover { color: var(--aiops-accent-ink); text-decoration-color: var(--aiops-accent); }
.module-label {
  margin: 24px 0 8px;
  color: var(--aiops-text);
  font-size: 13px;
  line-height: 20px;
  font-weight: 600;
}
.module-label span { margin-right: 6px; color: var(--aiops-text-muted); font-weight: 500; font-variant-numeric: tabular-nums; }

.rows {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--aiops-border);
  border-radius: var(--aiops-radius);
  overflow: hidden;
}
.rows li + li { border-top: 1px solid var(--aiops-border); }
.row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 52px;
  padding: 12px 16px;
  color: var(--aiops-text-body);
  text-decoration: none;
  transition: background-color 150ms ease;
}
a.row:hover { background: var(--aiops-subtle); }
a.row:focus-visible { outline-offset: -2px; border-radius: var(--aiops-radius); }
.row .n { flex: none; width: 22px; color: var(--aiops-text-faint); font-size: 14px; line-height: 22px; font-variant-numeric: tabular-nums; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-title { color: var(--aiops-text); font-size: 15px; line-height: 22px; font-weight: 500; text-wrap: pretty; }
.row-sub { color: var(--aiops-text-muted); font-size: 13px; line-height: 20px; text-wrap: pretty; }
.row-time { flex: none; color: var(--aiops-text-muted); font-size: 13px; line-height: 22px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.row-chev { flex: none; margin: 3px 0 0 auto; color: var(--aiops-text-muted); transition: transform 150ms var(--aiops-ease-enter), color 150ms ease; }
a.row:hover .row-chev { color: var(--aiops-accent-ink); transform: translateX(2px); }
.row.is-off .row-title { color: var(--aiops-text-muted); font-weight: 400; }
.row.is-off .row-time {
  padding: 0 8px;
  border: 1px solid var(--aiops-border);
  border-radius: 999px;
  font-size: 12px;
  line-height: 20px;
  font-weight: 500;
}
@media (max-width: 599px) {
  .row { flex-wrap: wrap; row-gap: 4px; }
  .row-time { order: 3; margin-left: 34px; }
  .row-main { flex-basis: calc(100% - 34px); }
}

.more { margin: 56px 0 0; }
.more h2, .shelf h2 { margin-bottom: 12px; }
.shelf { margin: 40px 0 0; }
.page h1 + .shelf { margin-top: 28px; }
.empty { margin: 0; color: var(--aiops-text-muted); font-size: 14px; line-height: 20px; }

/* Lane names: the hue sits on the icon, the words stay neutral */
.lane-name { display: flex; align-items: center; gap: 10px; }
.lane-name .i { width: 18px; height: 18px; }
.lane-foundation { color: var(--aiops-lane-foundation); }
.lane-attract { color: var(--aiops-lane-attract); }
.lane-convert { color: var(--aiops-lane-convert); }
.lane-deliver { color: var(--aiops-lane-deliver); }
.lane-run { color: var(--aiops-lane-run); }
.lane-build { color: var(--aiops-lane-build); }

/* ---------- Glossary page ---------- */

.page-intro { margin: 12px 0 0; }
.page-intro p { color: var(--aiops-text-body); font-size: 17px; line-height: 27px; }
.letters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 20px 0 8px;
  padding: 12px 0;
  border-top: 1px solid var(--aiops-border);
  border-bottom: 1px solid var(--aiops-border);
}
.letters a {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--aiops-text-muted);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  text-decoration: none;
  transition: color 150ms ease, background-color 150ms ease;
}
.letters a:hover { color: var(--aiops-text); background: var(--aiops-subtle); }
@media (max-width: 859px) { .letters a { width: 40px; height: 40px; } }

.gloss-list h2.letter {
  margin: 40px 0 0;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--aiops-border);
  color: var(--aiops-text-muted);
  font-size: 20px;
  line-height: 28px;
}
.gloss-entry { padding: 20px 0 4px; }
.gloss-entry + .gloss-entry { border-top: 1px solid var(--aiops-border); }
.prose .gloss-entry h3 { margin: 0 0 6px; font-size: 17px; line-height: 26px; }
.gloss-entry p { margin: 0 0 12px; }
.prose .taught { color: var(--aiops-text-muted); font-size: 13px; line-height: 20px; margin-bottom: 16px; }
.prose .taught a { color: var(--aiops-text-muted); }
.prose .taught a:hover { color: var(--aiops-accent-ink); }

/* ---------- Sign-in card ---------- */

.enter { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.enter-card {
  width: min(100%, 360px);
  padding: 28px 24px 24px;
  border: 1px solid var(--aiops-border);
  border-radius: var(--aiops-radius);
  background: var(--aiops-canvas);
}
.enter-mark { margin: 0; color: var(--aiops-text); font-size: 17px; line-height: 24px; font-weight: 600; letter-spacing: -0.4px; }
.enter-line { margin: 4px 0 24px; color: var(--aiops-text-muted); font-size: 14px; line-height: 20px; }
.enter-form label { display: block; margin: 0 0 6px; color: var(--aiops-text); font-size: 13px; line-height: 20px; font-weight: 500; }
.enter-form input[type="password"] {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--aiops-border-strong);
  border-radius: var(--aiops-radius-control);
  background: var(--aiops-canvas);
  color: var(--aiops-text);
  font: 400 16px/20px var(--aiops-font-sans);
}
.enter-form input[type="password"]:focus-visible { outline: 2px solid var(--aiops-accent); outline-offset: 2px; }
.enter-error { margin: 10px 0 0; color: var(--aiops-text); font-size: 14px; line-height: 20px; }
.enter-form button {
  display: block;
  width: 100%;
  height: 44px;
  margin: 16px 0 0;
  border: 0;
  border-radius: var(--aiops-radius-control);
  background: var(--aiops-accent);
  color: var(--aiops-accent-text);
  font: 500 15px/20px var(--aiops-font-sans);
  cursor: pointer;
  transition: opacity 150ms ease, scale 120ms var(--aiops-ease);
}
.enter-form button:hover { opacity: 0.88; }
.enter-form button:active { scale: 0.97; }

/* ---------- Tables that hold a glossary term ---------- */
/* On a wide screen a table that fits its box lets the term's card float out of it (site.js adds .is-fit). */
@media (min-width: 860px) {
  .table-box.is-fit { overflow: visible; }
  .table-box.is-fit thead th:first-child { border-top-left-radius: calc(var(--aiops-radius) - 1px); }
  .table-box.is-fit thead th:last-child { border-top-right-radius: calc(var(--aiops-radius) - 1px); }
}

/* ---------- Skill page ---------- */
/* Download: the home page's Install button (design/home), as a link. */
.skill-get { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: -8px 0 28px; }
.install {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 96px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--aiops-border);
  border-radius: var(--aiops-radius-control);
  background: var(--aiops-canvas);
  color: var(--aiops-text);
  font: 500 13px/20px var(--aiops-font-sans);
  text-decoration: none;
  transition: border-color 150ms ease, scale 120ms var(--aiops-ease-enter);
}
.prose a.install { color: var(--aiops-text); text-decoration: none; }
.install:hover { border-color: var(--aiops-border-strong); }
.install:active { scale: 0.97; }
.install svg { width: 14px; height: 14px; }
.skill-get-note { color: var(--aiops-text-muted); font-size: 13px; line-height: 20px; }
.skill-file { scroll-margin-top: calc(var(--bar-h) + 24px); }
@media (max-width: 859px) {
  .install { height: 40px; }
}

/* ---------- Resource hub ---------- */
/* Verdict: a word with a 7 mark, as on the home page. Use: accent dot. Try: accent ring. Watch: amber dot. */
.verdict { display: inline-flex; align-items: center; gap: 7px; color: var(--aiops-text); font-weight: 500; white-space: nowrap; }
.verdict::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--aiops-mark); }
.verdict.is-use::before { background: var(--aiops-accent); }
.verdict.is-try::before { background: none; box-shadow: inset 0 0 0 1.5px var(--aiops-accent); }
.verdict.is-watch::before { background: var(--aiops-amber); }
.verdict-note { color: var(--aiops-text-muted); font-size: 13px; font-weight: 400; }
.hub-task .table-box { margin-top: 0; }
.hub-task td a:hover { color: var(--aiops-accent-ink); text-decoration-color: var(--aiops-accent); }
.hub-task td .badge { vertical-align: 1px; }
@media (min-width: 600px) {
  .hub-task td:first-child { width: 30%; }
  .hub-task td:last-child { width: 1%; white-space: nowrap; }
}

/* ---------- Cover (design/rules.md "Cover") ----------
   A band above the title: the page's kind tile, wired to a tray of the tools it uses.
   The same parts, small, are the page's thumbnail in a list (.cover.is-thumb).
   Sizes hang off --tile; every logo is an <img> with fixed width and height, so nothing shifts. */
.cover {
  display: block;
  container-type: inline-size;
  margin: 0 0 20px;
  background: var(--aiops-subtle);
  border: 1px solid var(--aiops-border);
  border-radius: var(--aiops-radius);
}
.cover-row {
  --tile: clamp(40px, 9.5cqi, 64px);
  --pad: calc(var(--tile) / 7);
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(112px, 22cqi, 152px);
}
.cover-kind, .cover-tile {
  display: grid;
  place-items: center;
  flex: none;
  width: var(--tile);
  height: var(--tile);
  border-radius: calc(var(--tile) * 0.22);
}
.cover-kind {
  background: var(--aiops-surface);
  box-shadow: inset 0 0 0 1px var(--aiops-border-strong);
}
.cover-kind.is-accent { color: var(--aiops-accent); }
.cover-kind svg.i, .cover-tile svg.i { width: calc(var(--tile) * 0.43); height: calc(var(--tile) * 0.43); stroke-width: 1.25; }
/* The wire: a hairline from the kind tile, ending in a node at the tray. */
.cover-wire {
  position: relative;
  flex: none;
  width: calc(var(--tile) * 0.5);
  height: 1px;
  background: var(--aiops-border-strong);
}
.cover-wire::after {
  content: "";
  position: absolute;
  right: -3px;
  top: -2.5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--aiops-mark);
}
.cover-tools {
  display: flex;
  gap: var(--pad);
  padding: var(--pad);
  background: var(--aiops-canvas);
  border: 1px solid var(--aiops-border);
  border-radius: calc(var(--tile) * 0.22 + var(--pad));
}
.cover-tile {
  background: var(--aiops-logo-tile);
  box-shadow: inset 0 0 0 1px var(--aiops-border);
}
.cover-tile img { display: block; width: calc(var(--tile) * 0.57); height: calc(var(--tile) * 0.57); object-fit: contain; }
.cover-tile svg.logo { width: calc(var(--tile) * 0.5); height: calc(var(--tile) * 0.5); }
.cover-tile.is-neutral { background: none; }
.cover-tile.is-neutral { color: var(--aiops-text-muted); }

/* Thumbnail: 128 by 64, the same parts at a 24 tile, the first three tools. */
.cover.is-thumb {
  container-type: normal;
  flex: none;
  width: 128px;
  height: 64px;
  margin: 0;
  border-radius: 8px;
}
.cover.is-thumb .cover-row { --tile: 24px; --pad: 3px; height: 100%; }
.cover.is-thumb .cover-wire { width: 8px; }
.cover.is-thumb .cover-wire::after { right: -2px; top: -1.5px; width: 4px; height: 4px; }
.cover.is-thumb svg.i { stroke-width: 1.75; }

/* Where a thumbnail sits: a list row, the hub's Tool cell, a course head on the start page. */
.row:has(> .cover) { align-items: center; gap: 16px; }
.row:has(> .cover) .row-chev { margin-top: 0; }
/* Phone: the thumbnail takes its own line above the title, so the text keeps the row's width. */
@media (max-width: 599px) {
  .row:has(> .cover) { align-items: flex-start; row-gap: 10px; }
  .row:has(> .cover) .row-chev { margin-top: 3px; }
}
/* In the hub table the thumbnail sits above the name, so the Tool column keeps its width. */
.hub-tool { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.course-list-head .cover.is-thumb { align-self: center; }
