/* One control style across the board, personal spaces and editors. */
:root {
  --control-accent: var(--teal);
  --control-radius: .65rem;
  --key-relief: 0 1px 2px light-dark(#1e30300c, #00000020), 0 4px 8px -4px light-dark(#1e303033, #00000070);
  --key-sheen: linear-gradient(180deg, #ffffff12, #ffffff00 65%, #10282705);
  --key-down: none;
}
:root, :where(.dash-control) {
  --control-line: color-mix(in srgb, var(--control-accent) 14%, var(--rule));
  --control-fill: var(--surface);
  --control-press-fill: color-mix(in srgb, var(--control-accent) 12%, var(--surface));
}
.dash-control {
  --button-face: var(--control-fill);
  --button-ink: var(--control-accent);
  --button-line: var(--control-line);
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  min-height: max(44px, 2.7em);
  padding: .5em .9em;
  border: 1px solid var(--button-line);
  border-radius: .7em;
  background: var(--button-face);
  background-image: var(--key-sheen);
  box-shadow: var(--key-relief);
  color: var(--button-ink);
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  touch-action: manipulation;
  cursor: pointer;
  transition: background-color 140ms, border-color 140ms, transform 140ms;
}
.dash-control--primary {
  --button-face: var(--control-accent);
  --button-line: var(--control-accent);
  --button-ink: light-dark(#fff, #17282b);
}
.dash-control .control-mark {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 1.2em;
  height: 1.2em;
  color: currentColor;
  font: 500 1.15em/1 Inter, sans-serif;
}
.control-mark svg { width: 1.2em; height: 1.2em; pointer-events: none; }
.dash-control[aria-pressed="true"]:not(.dash-control--primary) {
  --button-face: var(--control-press-fill);
  --button-line: color-mix(in srgb, var(--control-accent) 35%, var(--rule));
}
@media (hover: hover) and (pointer: fine) {
  :root:not([data-pointer="touch"]) .dash-control:hover:not(:disabled, [aria-disabled="true"]) {
    --button-face: color-mix(in srgb, var(--control-accent) 6%, var(--surface));
    --button-line: color-mix(in srgb, var(--control-accent) 40%, var(--rule));
  }
  :root:not([data-pointer="touch"]) .dash-control--primary:hover:not(:disabled, [aria-disabled="true"]) {
    --button-face: color-mix(in srgb, var(--control-accent) 90%, var(--surface));
  }
}
.dash-control:is(:active, [data-pressed]):not(:disabled, [aria-disabled="true"]) {
  --button-face: var(--control-press-fill);
  --button-line: var(--control-accent);
  box-shadow: var(--key-down);
  background-image: none;
  transition-duration: 0s;
}
.dash-control--primary:is(:active, [data-pressed]):not(:disabled, [aria-disabled="true"]) {
  --button-face: color-mix(in srgb, var(--control-accent) 84%, var(--surface));
}
.dash-control:focus-visible { outline: 3px solid var(--control-accent); outline-offset: 3px; }
.dash-control:disabled, .dash-control[aria-disabled="true"] { box-shadow: none; background-image: none; cursor: default; opacity: .5; }
@media (prefers-reduced-motion: no-preference) {
  .dash-control:is(:active, [data-pressed]):not(:disabled, [aria-disabled="true"]) { translate: 0 1px; }
}
@media (prefers-reduced-motion: reduce) { .dash-control { transition: none; } }
