/* Source Robotics docs — house styles (Phase 0) */

.md-header__button.md-logo img {
  height: 48px;
  width: auto;
}

/* Manual landing page: hero image and the document metadata block */
.hero {
  display: block;
  margin: 1.5rem auto 2rem auto;
  max-height: 28rem;
  max-width: 100%;
}

.doc-meta {
  border-top: 1px solid var(--md-default-fg-color--lightest);
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
  padding: 1rem 0;
  margin: 2rem 0;
}

.doc-meta p {
  margin: 0.4rem 0;
}

/* Numbered figures: <figure> with <figcaption> */
.md-typeset figure {
  margin: 1.5rem auto;
  text-align: center;
}

.md-typeset figcaption {
  font-size: 0.8rem;
  font-style: italic;
  color: var(--md-default-fg-color--light);
  margin-top: 0.4rem;
}

/* Hub page row lists: "Title | one line [docs] [repo]" */
.md-typeset .rows li {
  margin-bottom: 0.35rem;
}

/* Icon colours for inline icons: :material-check-circle:{ .sr-green } */
.sr-green { color: #19c37d; }
.sr-red { color: #ef5552; }
.sr-amber { color: #e8a33d; }

/* The edit / report line at the end of every page */
.md-typeset .page-help {
  font-size: 0.75rem;
  color: var(--md-default-fg-color--light);
}

/* Command reference pages (generated by hooks/command_pages.py). Every rule here applies only to a page whose title
   is a command (h1.cmd-title), so the manuals keep the theme's look. Matched to the layout the owner chose
   (2026-10-23): a plain table, a left-aligned figure with a small caption, the type above what Returns means, a
   collapsed Usage restrictions box with the code count in its title, See also as plain names. */
.md-typeset h1.cmd-title {
  font-family: var(--md-code-font-family);
  font-weight: 500;
  color: var(--md-default-fg-color);
  margin-bottom: 0.5rem;
}

.md-typeset:has(> h1.cmd-title) > p,
.md-typeset:has(> h1.cmd-title) details.restrictions p {
  max-width: 42rem;
}

.md-typeset:has(> h1.cmd-title) h2 {
  font-size: 1.3em;
  font-weight: 400;
  margin: 1.6em 0 0.6em;
}

.md-typeset .cmd-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 1.2rem;
}

.md-typeset .cmd-facts .fact {
  font-size: 0.68rem;
  padding: 0.1rem 0.6rem;
  border-radius: 1rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  background: var(--md-code-bg-color);
}

.md-typeset .cmd-facts .fact.q {
  color: var(--md-accent-fg-color);
  border-color: transparent;
  background: var(--md-accent-fg-color--transparent);
}

/* the Arguments table: no frame, a heavier rule under the header, names never broken */
.md-typeset:has(> h1.cmd-title) table:not([class]) {
  display: table;
  width: 100%;
  border: none;
  border-radius: 0;
  box-shadow: none;
  font-size: 0.68rem;
}

.md-typeset:has(> h1.cmd-title) table:not([class]) th {
  background: none;
  font-weight: 500;
  border-bottom: 2px solid var(--md-default-fg-color--lightest);
  padding: 0.55em 0.7em;
}

.md-typeset:has(> h1.cmd-title) table:not([class]) td {
  border-top: 1px solid var(--md-default-fg-color--lightest);
  padding: 0.55em 0.7em;
}

.md-typeset:has(> h1.cmd-title) table:not([class]) tr:hover {
  background: none;
  box-shadow: none;
}

.md-typeset:has(> h1.cmd-title) table:not([class]) th:first-child,
.md-typeset:has(> h1.cmd-title) table:not([class]) td:first-child {
  white-space: nowrap;
}

/* Colour rule (owner, 2026-10-23): BLUE (the theme's link colour) is for anything that takes you elsewhere, GREEN
   (the accent) for status and drawing only (the facts strip's "Queued", a figure's path). Never a green link. */

/* the per-move settings in the **options row: links, so blue; the default beside each name in grey */
.md-typeset .optlinks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.35rem;
  margin: 0.4rem 0 0.3rem;
}

.md-typeset a.opt {
  font-family: var(--md-code-font-family);
  font-size: 0.95em;
  font-weight: 500;
  padding: 0.05em 0.45em;
  border-radius: 0.2rem;
  background: rgba(68, 138, 255, 0.12);
  background: color-mix(in srgb, var(--md-typeset-a-color) 14%, transparent);
  color: var(--md-typeset-a-color);
  white-space: nowrap;
}

.md-typeset a.opt:hover {
  text-decoration: underline;
}

.md-typeset a.opt code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

.md-typeset a.opt .od {
  color: var(--md-default-fg-color--light);
  font-weight: 400;
}

/* a command's figure: left-aligned, a small plain caption */
.md-typeset figure.cmd-fig {
  align-items: flex-start;
  margin: 0.4rem 0 1.4rem;
  width: auto;
  max-width: 100%;
  text-align: left;
}

.md-typeset figure.cmd-fig svg {
  width: 100%;
  max-width: 28rem;
  height: auto;
}

.md-typeset figure.cmd-fig figcaption {
  font-style: normal;
  font-size: 0.64rem;
  text-align: left;
  max-width: 34rem;
  margin: 0.4rem 0 0;
  color: var(--md-default-fg-color--light);
}

.cmd-fig .fig-arm { fill: var(--md-default-fg-color--light); stroke: var(--md-default-fg-color--light); }
.cmd-fig .fig-ghost { fill: var(--md-default-fg-color--lighter); stroke: var(--md-default-fg-color--lighter); }
.cmd-fig .fig-floor { stroke: var(--md-default-fg-color--light); stroke-width: 1.5; fill: none; }
.cmd-fig .fig-path { fill: none; stroke: var(--md-accent-fg-color); stroke-width: 2.4; stroke-dasharray: 6 5; }
.cmd-fig .fig-dot { fill: var(--md-accent-fg-color); }
.cmd-fig .fig-label { fill: var(--md-default-fg-color--light); font-size: 12px; }

/* Usage restrictions: collapsed, orange, no icon, the code count small beside the title */
.md-typeset details.restrictions {
  border-color: #e8a33d;
  margin-top: 2rem;
}

.md-typeset details.restrictions > summary {
  background-color: rgba(232, 163, 61, 0.1);
  padding-left: 0.8rem;
  font-weight: 700;
}

.md-typeset details.restrictions > summary::before {
  display: none;
}

.md-typeset details.restrictions > summary .count {
  font-weight: 400;
  font-size: 0.85em;
  margin-left: 0.4em;
  color: var(--md-default-fg-color--light);
}

/* See also: plain names; the ones with a page are links, in the link colour */
.md-typeset .seealso p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
}

.md-typeset .seealso code {
  background: none;
  padding: 0;
  font-size: 0.85em;
}

.md-typeset .seealso a,
.md-typeset .seealso a code {
  color: var(--md-typeset-a-color);
}

/* Command pages: the classification line under a command heading */
.md-typeset .cmd-class {
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--md-default-fg-color--light);
  margin-top: -0.6rem;
}
