/* Give the appearance control the same quiet, compact treatment as the header. */
:is(.hub-header, .lesson-topbar, .cockpit-command) .appearance > summary {
  min-height: 36px;
  min-width: 0;
  justify-content: center;
  gap: 9px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--ink);
  font: 600 13px/1 var(--font-body);
  white-space: nowrap;
}

:is(.hub-header, .lesson-topbar, .cockpit-command) .appearance > summary::before {
  content: "";
  width: 16px;
  height: 16px;
  flex: none;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M3 7h6m6 0h6M3 17h10m6 0h2'/%3E%3Ccircle cx='12' cy='7' r='3'/%3E%3Ccircle cx='16' cy='17' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
}

:is(.hub-header, .lesson-topbar, .cockpit-command) .appearance > summary::after {
  content: "";
  width: 6px;
  height: 6px;
  flex: none;
  margin-left: 3px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-2px) rotate(45deg);
}

:is(.hub-header, .lesson-topbar, .cockpit-command) .appearance > summary:hover,
:is(.hub-header, .lesson-topbar, .cockpit-command) .appearance[open] > summary {
  background: var(--surface-3);
  border-color: var(--accent-700);
}

:is(.hub-header, .lesson-topbar, .cockpit-command) .appearance[open] > summary {
  outline: none;
}

:is(.hub-header, .lesson-topbar, .cockpit-command) .appearance[open] > summary::after {
  transform: translateY(2px) rotate(225deg);
}

:is(.hub-header, .lesson-topbar, .cockpit-command) .appearance > summary:focus-visible {
  outline: 2px solid var(--accent-700);
  outline-offset: 3px;
}

html[data-design="field"] :is(.hub-header, .lesson-topbar, .cockpit-command) .appearance > summary {
  background: rgb(255 255 255 / 7%);
  border-color: rgb(213 235 218 / 32%);
  color: #f4f5e9;
}

html[data-design="field"] :is(.hub-header, .lesson-topbar, .cockpit-command) .appearance > summary::before {
  color: #dceca6;
}

html[data-design="field"] :is(.hub-header, .lesson-topbar, .cockpit-command) .appearance > summary:hover,
html[data-design="field"] :is(.hub-header, .lesson-topbar, .cockpit-command) .appearance[open] > summary {
  background: rgb(255 255 255 / 14%);
  border-color: #9cb7a3;
}

html[data-design="field"] :is(.hub-header, .lesson-topbar, .cockpit-command) .appearance > summary:focus-visible {
  outline-color: #e5ef96;
}

@media (max-width: 520px) {
  :is(.hub-header, .lesson-topbar, .cockpit-command) .appearance > summary { min-height: 34px; padding: 7px 9px; gap: 7px; font-size: 11px; }
}
