/* Owner/market chrome shares ANKLE's live theme tokens. Authored media and
   embedded page documents are deliberately outside this control scope.
   Zero selector specificity lets native preset chrome (bevels, typography,
   custom theme CSS) remain the authority. */
:where([data-aleqth-controls]) {
  color: var(--fg);
}
:where([data-aleqth-controls] button:not(.work-thumb):not(.aleqth-display-preview),
       [data-aleqth-controls] .button, .aleqth-control) {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid var(--control-line, var(--line));
  border-radius: var(--radius, 0);
  background: var(--control-bg, var(--panel));
  color: var(--fg);
  font: 13px/1.4 var(--mono-font, var(--body-font));
  text-decoration: none;
  box-shadow: var(--control-shadow, none);
  cursor: pointer;
}
:where([data-aleqth-controls] button:not(.work-thumb):not(.aleqth-display-preview),
       [data-aleqth-controls] .button, .aleqth-control):hover:not(:disabled):not([aria-disabled="true"]) {
  background: var(--highlight);
}
:where([data-aleqth-controls] button, [data-aleqth-controls] .button, .aleqth-control):is(:active, [aria-pressed="true"]) {
  background: var(--highlight);
  border-style: inset;
}
:where([data-aleqth-controls] button.primary, [data-aleqth-controls] .button.primary) {
  background: var(--highlight);
  font-weight: 700;
}
:where([data-aleqth-controls] button, [data-aleqth-controls] .button, .aleqth-control):is(:disabled, [aria-disabled="true"]) {
  opacity: .55;
  cursor: not-allowed;
}
:where([data-aleqth-controls] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
       [data-aleqth-controls] select, [data-aleqth-controls] textarea) {
  box-sizing: border-box;
  min-width: 0;
  min-height: 36px;
  padding: 7px;
  border: 1px solid var(--control-line, var(--line));
  border-radius: var(--radius, 0);
  background: var(--control-bg, var(--panel));
  color: var(--fg);
  font: 13px/1.4 var(--mono-font, var(--body-font));
}
:where([data-aleqth-controls] input[type="checkbox"], [data-aleqth-controls] input[type="radio"]) {
  accent-color: var(--link);
}
:where([data-aleqth-controls] input)::file-selector-button {
  border: 1px solid var(--control-line, var(--line));
  border-radius: var(--radius, 0);
  background: var(--panel);
  color: var(--fg);
  font: inherit;
  padding: 5px 9px;
  margin-right: 10px;
  cursor: pointer;
}
:where([data-aleqth-controls] button, [data-aleqth-controls] .button,
       [data-aleqth-controls] input, [data-aleqth-controls] textarea,
       [data-aleqth-controls] select, [data-aleqth-controls] summary,
       .aleqth-control):focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
}
:where(dialog[data-aleqth-controls]) {
  box-sizing: border-box;
  color: var(--fg);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius, 0);
  font: 14px/1.5 var(--body-font);
  box-shadow: var(--shadow, none);
}
@media (max-width: 700px) {
  :where([data-aleqth-controls] button:not(.work-thumb):not(.aleqth-display-preview),
         [data-aleqth-controls] .button, .aleqth-control) { min-height: 44px; }
}
/* ANKLE 2029 system tools follow its flat OS rail chrome. The theme also
   carries Original's global rounded button rule; scope this exception to
   administrative controls so portfolio content and the shell stay intact. */
body.theme-ankle-2029 :is([data-aleqth-controls] button:not(.work-thumb):not(.aleqth-display-preview), [data-aleqth-controls] .button, .aleqth-control) {
  border: 1px solid var(--control-line, var(--line)) !important;
  border-radius: 0 !important;
  background: var(--panel) !important;
  color: var(--fg) !important;
  font-family: var(--mono-font, var(--body-font)) !important;
  box-shadow: none !important;
}
body.theme-ankle-2029 :is([data-aleqth-controls] button:not(.work-thumb):not(.aleqth-display-preview), [data-aleqth-controls] .button, .aleqth-control):hover:not(:disabled) {
  background: var(--highlight) !important;
  color: var(--fg) !important;
}
body.theme-ankle-2029 [data-aleqth-controls] :is(button.primary, .button.primary) {
  background: var(--fg) !important;
  color: var(--panel) !important;
}
