/* TLDR / Deep Dive mode toggle — inline with meta */

.mode-toggle {
  display: flex;
  gap: 0;
  margin-top: 8px;
}

.mode-toggle button {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 4px 0;
  margin-right: 16px;
  margin-bottom: -1px;
  font-size: 18px;
  font-weight: 400;
  cursor: pointer;
  color: var(--muted);
  transition: color 150ms ease, border-color 150ms ease;
  font-family: inherit;
}

.mode-toggle button:last-child {
  margin-right: 0;
}

.mode-toggle button.active {
  color: var(--text);
  border-bottom-color: var(--text);
  font-weight: 500;
}

.mode-toggle button:hover:not(.active) {
  color: var(--text);
}

/* Hide theory-only content in TLDR mode (default) */
.theory-only {
  display: none;
}

/* Show theory-only content in deep-dive mode */
/* Supports both html.deep-dive-mode (FOUC prevention) and body.deep-dive-mode (JS toggle) */
body.deep-dive-mode .theory-only,
html.deep-dive-mode .theory-only {
  display: block;
}

/* When a theory-only element is inside a table row */
tr.theory-only {
  display: none;
}
body.deep-dive-mode tr.theory-only,
html.deep-dive-mode tr.theory-only {
  display: table-row;
}

/* When a theory-only element is a list item */
li.theory-only {
  display: none;
}
body.deep-dive-mode li.theory-only,
html.deep-dive-mode li.theory-only {
  display: list-item;
}

/* Hide deep-dive-only content in TLDR mode (default) */
.deep-dive-only {
  display: none;
}
body.deep-dive-mode .deep-dive-only,
html.deep-dive-mode .deep-dive-only {
  display: block;
}
tr.deep-dive-only {
  display: none;
}
body.deep-dive-mode tr.deep-dive-only,
html.deep-dive-mode tr.deep-dive-only {
  display: table-row;
}
li.deep-dive-only {
  display: none;
}
body.deep-dive-mode li.deep-dive-only,
html.deep-dive-mode li.deep-dive-only {
  display: list-item;
}

/* Show tldr-only content in TLDR mode (default), hide in Deep Dive */
.tldr-only {
  display: block;
}
span.tldr-only {
  display: inline;
}
body.deep-dive-mode .tldr-only,
html.deep-dive-mode .tldr-only {
  display: none;
}

/* Inline variants for deep-dive-only */
span.deep-dive-only {
  display: none;
}
body.deep-dive-mode span.deep-dive-only,
html.deep-dive-mode span.deep-dive-only {
  display: inline;
}

/* Subtle indicator label for mode-specific blocks */
.mode-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: rgba(0,0,0,0.04);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  margin-bottom: 8px;
}
