/* ---------------------------------------------------------------
   ME 222B course site — small additions on top of Material.
   --------------------------------------------------------------- */

/* Lab header strip: duration / hardware / deliverable at a glance.
   Usage in markdown:  see resources/lab-template.md                 */
.lab-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: .75rem;
  margin: 1.2rem 0 2rem;
}

.lab-meta > div {
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: .3rem;
  padding: .6rem .8rem;
  background: var(--md-code-bg-color);
}

.lab-meta .k {
  display: block;
  font-size: .62rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--md-default-fg-color--light);
  margin-bottom: .15rem;
}

.lab-meta .v {
  font-weight: 600;
  font-size: .78rem;
  line-height: 1.35;
}

/* Wiring tables read better centred and monospaced on the pin columns */
.pinout table td:first-child,
.pinout table td:nth-child(2) {
  font-family: var(--md-code-font-family);
  white-space: nowrap;
}

/* Make the checkpoint admonition visually distinct from a plain note */
:root {
  --md-admonition-icon--checkpoint: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg>');
}

.md-typeset .admonition.checkpoint,
.md-typeset details.checkpoint {
  border-color: #7e57c2;
}

.md-typeset .checkpoint > .admonition-title,
.md-typeset .checkpoint > summary {
  background-color: #7e57c21a;
}

.md-typeset .checkpoint > .admonition-title::before,
.md-typeset .checkpoint > summary::before {
  background-color: #7e57c2;
  -webkit-mask-image: var(--md-admonition-icon--checkpoint);
          mask-image: var(--md-admonition-icon--checkpoint);
}

/* Status pills for the schedule table */
.pill {
  display: inline-block;
  padding: .1rem .5rem;
  border-radius: 1rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .03em;
}
.pill.open    { background: #2e7d3222; color: #2e7d32; }
.pill.soon    { background: #ef6c0022; color: #ef6c00; }
.pill.closed  { background: #9e9e9e22; color: #757575; }

[data-md-color-scheme="slate"] .pill.open   { color: #81c784; }
[data-md-color-scheme="slate"] .pill.soon   { color: #ffb74d; }
[data-md-color-scheme="slate"] .pill.closed { color: #bdbdbd; }

/* Wiring / bench photos shouldn't blow past the text column */
.md-typeset img { border-radius: .3rem; }
