/* 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;
}

/* The "Copy this page as Markdown" button sits with the edit and view buttons */
.md-copy-md svg { fill: currentcolor; }

/* The small calculators on the technical pages (docs/javascripts/*-calculator.js) */
.calc {
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 0.2rem;
  padding: 0.8rem 1rem 0.2rem 1rem;
  margin: 1rem 0;
  background: var(--md-code-bg-color);
}
.calc__row { margin: 0.3rem 0 0.6rem 0; }
.calc__row label { display: block; font-size: 0.7rem; color: var(--md-default-fg-color--light); }
.calc__row--inline label { display: inline-block; margin-right: 0.4rem; }
.calc__row input[type=range] { width: 100%; accent-color: var(--md-accent-fg-color); }
.calc__row input[type=number], .calc__row select {
  width: 6rem; margin-right: 1.2rem; padding: 0.15rem 0.3rem; font: inherit; font-size: 0.75rem;
  color: var(--md-default-fg-color); background: var(--md-default-bg-color);
  border: 1px solid var(--md-default-fg-color--lighter); border-radius: 0.15rem;
}
.calc__row select { width: auto; }
.calc__result { font-size: 0.8rem; margin: 0.4rem 0 0.8rem 0; }
.calc__result strong { color: var(--md-accent-fg-color); }

/* The print page (print-site plugin) and the PDF printed from it: no interactive blocks, no page chrome */
#print-site-page .gripper-viewer, #print-site-page .arm-viewer, #print-site-page .calc, #print-site-page .gripper-calc,
#print-site-page .md-feedback, #print-site-page .page-help, #print-site-page .md-source-file, #print-site-page .md-copy-md { display: none !important; }
@media print {
  .md-consent, .md-banner, .md-top, .md-copy-md, .page-help, .md-feedback { display: none !important; }
  .md-typeset img { max-height: 24cm; }
}

/* The board viewer (three.js, the gripper sites' configurator script) on the landing and dimensions pages */
.gripper-viewer { margin: 0.5rem 0 1rem 0; }
.gripper-viewer__canvas { display: block; width: 100%; height: 26rem; border-radius: 0.2rem; touch-action: none; }
.gripper-viewer__controls { display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; align-items: center; margin-top: 0.5rem; font-size: 0.7rem; color: var(--md-default-fg-color--light); }
.gripper-viewer__field { display: inline-flex; align-items: center; gap: 0.4rem; }
.gripper-viewer__field input[type=range] { width: 9rem; accent-color: var(--md-accent-fg-color); }
.gripper-viewer__field select, .gripper-viewer__field input[type=color] {
  font: inherit; font-size: 0.7rem; color: var(--md-default-fg-color); background: var(--md-default-bg-color);
  border: 1px solid var(--md-default-fg-color--lighter); border-radius: 0.15rem; padding: 0.1rem 0.3rem;
}
.gripper-viewer__field input[type=color] { width: 1.6rem; height: 1.3rem; padding: 0; }
.gripper-viewer__swatches { display: inline-flex; gap: 0.25rem; }
.gripper-viewer__swatches button { width: 1.1rem; height: 1.1rem; border-radius: 50%; border: 1px solid var(--md-default-fg-color--lighter); cursor: pointer; padding: 0; }
.gripper-viewer__controls .md-button { font-size: 0.65rem; padding: 0.3em 0.9em; margin: 0; }
.gripper-viewer__hint { font-size: 0.7rem; color: var(--md-default-fg-color--light); margin-top: 0.5rem; }

/* Numbered annotations sit over original screenshots; the captured UI is unmodified. */
.gui-shot { margin: 1.3rem 0; }
.gui-shot__image { position: relative; }
.gui-shot__image p { margin: 0; }
.gui-shot__image img { display: block; width: 100%; border: 1px solid var(--md-default-fg-color--lightest); border-radius: .3rem; }
.gui-shot__mark { position: absolute; display: grid; place-items: center; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: #166534; color: #fff; border: 2px solid #fff; font: bold .8rem/1 sans-serif; box-shadow: 0 1px 5px #0005; pointer-events: none; }
.gui-shot figcaption { margin-top: .6rem; text-align: left; font-style: normal; }
.can-tool { margin: 1rem 0; }
.can-tool fieldset { min-width: 0; margin: 1rem 0; padding: 1rem; border: 1px solid var(--md-default-fg-color--lightest); border-radius: .4rem; }
.can-tool legend { padding: 0 .4rem; font-weight: 700; }
.can-tool label, .can-tool small { display: block; margin-top: .6rem; }
.can-tool small { margin-top: .15rem; color: var(--md-default-fg-color--light); }
.can-tool input[type=number], .can-tool input[type=text], .can-tool select { display: block; box-sizing: border-box; width: 100%; max-width: 100%; padding: .5rem; border: 1px solid var(--md-default-fg-color--light); border-radius: .2rem; background: var(--md-default-bg-color); color: var(--md-default-fg-color); font: inherit; }
.can-tool select { white-space: normal; }
.can-tool input:focus, .can-tool select:focus { outline: 2px solid var(--md-accent-fg-color); outline-offset: 2px; }
.can-tool button { margin: .8rem .4rem 0 0; }
.can-tool button:disabled { opacity: .5; cursor: default; }
.can-tool pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.can-tool__decoded { overflow-x: auto; margin-top: 1rem; }
.can-tool__status { font-size: .8rem; }
@media print { .can-tool { display: none; } }

/* Two repositories in the header: the product's (with the theme's stars, forks and release) over this documentation's */
@media screen and (min-width: 60em) {
  .md-header__source { display: flex; flex-direction: column; justify-content: center; gap: 0.15rem; height: 2.4rem; width: 12.5rem; max-width: 12.5rem; }
}
.sr-repo { display: flex; align-items: center; line-height: 1.15; }
.sr-repo .md-source__icon { display: flex; align-items: center; justify-content: center; height: auto; width: 1.1rem; flex-shrink: 0; }
.sr-repo .md-source__icon svg { margin: 0; height: 0.8rem; width: 0.8rem; }
[dir=ltr] .sr-repo .md-source__icon + .md-source__repository { margin-left: 0.35rem; padding-left: 0; }
.sr-repo .md-source__repository { display: block; min-width: 0; max-width: none; flex: 1; font-size: 0.6rem; }
.sr-repo--product .md-source__facts { font-size: 0.5rem; margin: 0.05rem 0 0; }
.sr-repo--docs { opacity: 0.8; }
.sr-repo--docs .md-source__icon svg { height: 0.7rem; width: 0.7rem; }
.sr-repo--docs .md-source__repository { font-size: 0.55rem; }
.md-nav__source .sr-repo { padding: 0.35rem 0.4rem; }
.md-nav__source .sr-repo--docs { padding-top: 0; }
