/* scFoundry documentation - theme tweaks on top of Furo. */

:root {
  --color-brand-primary: #0F766E;
  --color-brand-content: #0F766E;
}

body[data-theme="dark"] {
  --color-brand-primary: #5EEAD4;
  --color-brand-content: #5EEAD4;
}

@media (prefers-color-scheme: dark) {
  body:not([data-theme="light"]) {
    --color-brand-primary: #5EEAD4;
    --color-brand-content: #5EEAD4;
  }
}

/* Reference pages are wide parameter tables; let them use the space and scroll
   inside their own container rather than pushing the page sideways. */
.wy-table-responsive,
div.table-wrapper,
table.docutils {
  display: block;
  overflow-x: auto;
  max-width: 100%;
}

table.docutils {
  width: 100%;
  border-collapse: collapse;
}

table.docutils td,
table.docutils th {
  vertical-align: top;
  line-height: 1.45;
}

/* Keep method ids, params and paths from wrapping mid-token in tables. */
table.docutils code.literal {
  white-space: nowrap;
}

/* Support-matrix ticks and dashes read better centred and a touch larger. */
table.docutils td p {
  margin-bottom: 0.35rem;
}

/* Landing-page cards */
.sd-card {
  border-radius: 10px;
}

.sd-card-title {
  font-weight: 600;
}

/* Screenshots of terminal sessions */
img.terminal-shot {
  border-radius: 8px;
  border: 1px solid var(--color-background-border);
  max-width: 100%;
}

/* Figures should never overflow on narrow screens. */
figure img,
.figure img {
  max-width: 100%;
  height: auto;
}

/* ---------------------------------------------------------------------------
   Interactive benchmark explorer
   --------------------------------------------------------------------------- */

.bench-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
  align-items: flex-end;
  margin: 1rem 0 1.25rem;
}

.bench-controls label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-foreground-muted);
}

.bench-controls select,
.bench-controls input {
  font: inherit;
  font-weight: 400;
  padding: 0.4rem 0.55rem;
  border-radius: 6px;
  border: 1px solid var(--color-background-border);
  background: var(--color-background-primary);
  color: var(--color-foreground-primary);
  min-width: 13rem;
}

.bench-controls select:focus-visible,
.bench-controls input:focus-visible {
  outline: 2px solid var(--color-brand-primary);
  outline-offset: 1px;
}

/* The table is wide; it scrolls inside its own box so the page never does. */
.bench-scroll {
  overflow-x: auto;
  max-width: 100%;
}

table.bench-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
}

table.bench-table th,
table.bench-table td {
  padding: 0.4rem 0.6rem;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid var(--color-background-border);
}

table.bench-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--color-background-primary);
  border-bottom: 2px solid var(--color-background-border);
  padding: 0;
}

table.bench-table tbody th[scope="row"] {
  text-align: left;
  font-weight: 600;
}

button.bench-sort {
  font: inherit;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--color-foreground-muted);
  background: none;
  border: 0;
  width: 100%;
  padding: 0.5rem 0.6rem;
  text-align: right;
  cursor: pointer;
}

button.bench-sort:hover,
button.bench-sort.is-active {
  color: var(--color-brand-content);
}

table.bench-table thead th:first-child button.bench-sort {
  text-align: left;
}

table.bench-table tbody tr:hover {
  background: var(--color-background-hover);
}

table.bench-table tr.is-baseline {
  background: var(--color-highlight-on-target, rgba(15, 118, 110, 0.08));
}

.bench-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.05rem 0.35rem;
  margin-left: 0.35rem;
  border-radius: 4px;
  border: 1px solid var(--color-brand-primary);
  color: var(--color-brand-content);
  vertical-align: middle;
}

.bench-tag-community {
  border-color: var(--color-foreground-muted);
  color: var(--color-foreground-muted);
}

.bench-note {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--color-foreground-muted);
}

@media (max-width: 46em) {
  .bench-controls select,
  .bench-controls input {
    min-width: 0;
    width: 100%;
  }
  .bench-controls label {
    flex: 1 1 100%;
  }
}
