.shade-guide {
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.shade-guide__label {
  margin: 0 0 .85rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}
.shade-guide__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.shade-tab {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  font: inherit;
  color: var(--ink);
  min-width: 0;
}
.shade-tab__handle {
  display: block;
  padding: .45rem .8rem;
  font-size: .88rem;
  font-weight: 600;
  text-align: center;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--ink) 35%, var(--border));
  border-radius: 6px;
  transition: background .15s ease, border-color .15s ease;
}
.shade-tab:hover .shade-tab__handle {
  background: color-mix(in srgb, var(--brand) 12%, var(--surface));
  border-color: var(--brand);
}
.shade-tab[aria-pressed="true"] .shade-tab__handle {
  background: var(--brand);
  color: var(--surface);
  border-color: var(--brand);
}
.shade-tab:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.shade-guide__panels { margin-top: 1.25rem; }
.shade-panel {
  border-top: 1px solid var(--border);
  padding-top: .9rem;
}
.shade-panel[hidden] { display: none; }
.shade-panel__kicker {
  margin: 0;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--brand);
}
.shade-panel h3 { margin: .2rem 0 .5rem; font-size: 1.05rem; }
.shade-panel ul { margin: 0; padding-left: 1.1rem; }
.shade-panel li { margin: .25rem 0; font-size: .92rem; }
.shade-panel .note { margin-top: .6rem; }
@media (max-width: 420px) {
  .shade-tab__handle { font-size: .8rem; padding: .4rem .6rem; }
}

/* Data tables: fit the screen, scroll sideways with a visible hint if wider */
lg-table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background:
    linear-gradient(to right, var(--surface), var(--surface)) left center / 24px 100% no-repeat local,
    linear-gradient(to left, var(--surface), var(--surface)) right center / 24px 100% no-repeat local,
    linear-gradient(to right, rgba(0, 0, 0, .16), rgba(0, 0, 0, 0)) left center / 12px 100% no-repeat scroll,
    linear-gradient(to left, rgba(0, 0, 0, .16), rgba(0, 0, 0, 0)) right center / 12px 100% no-repeat scroll;
}
lg-table table { min-width: 36rem; }
lg-table th,
lg-table td {
  vertical-align: top;
  white-space: normal;
  height: auto;
}
lg-table tr { height: auto; }
@media (max-width: 600px) {
  lg-table table {
    min-width: 0;
    width: 100%;
    font-size: .85rem;
  }
  lg-table th,
  lg-table td {
    padding: .5rem .45rem;
    overflow-wrap: anywhere;
  }
  lg-table caption {
    display: table-caption;
    max-width: 100%;
    white-space: normal;
    text-align: left;
  }
}

/* Lab cards: three even columns, equal height */
lg-cards [class*="grid"] {
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
}
lg-cards [class*="grid"] > * {
  display: flex;
  flex-direction: column;
  height: 100%;
}
lg-cards [class*="grid"] > * > :last-child { margin-top: auto; }
lg-cards [class*="grid"] > * p:empty { display: none; }
@media (max-width: 900px) {
  lg-cards [class*="grid"] { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  lg-cards [class*="grid"] { grid-template-columns: 1fr; }
}