:root {
  color-scheme: dark;
  --bg: #171613;
  --text: #efe8dc;
  --muted: #b0a698;
  --line: #34302a;
  --accent: #e0b15a;
  --danger: #d7a394;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 "Liberation Sans", "DejaVu Sans", sans-serif;
}

.catalog {
  max-width: 64.8rem;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

.catalog-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 0 0 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

a.home {
  display: flex;
  color: var(--accent);
  text-decoration: none;
}

a.home .mark {
  height: 28px;
  width: auto;
  display: block;
}

a.home:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

h1 {
  font-size: 28px;
  font-weight: 600;
  margin: 0;
}

h1 .mark {
  height: 0.68em;
  width: auto;
  margin-right: 0.26em;
  color: var(--accent);
  vertical-align: 0.02em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
  margin: 0;
}

.site-nav > a {
  color: var(--accent);
  text-decoration: none;
}

.site-nav > a:hover { text-decoration: underline; }

#account {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0;
}

#account:empty {
  display: none;
}

#account a {
  color: var(--accent);
  text-decoration: none;
}

#account a:hover,
#account a:focus-visible {
  text-decoration: underline;
}

.account-menu {
  position: relative;
}

.account-menu > button {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.account-menu > button::after {
  content: "";
  display: inline-block;
  margin-left: 0.45em;
  border-width: 5px 4px 0;
  border-style: solid;
  border-color: currentColor transparent transparent;
  vertical-align: 0.12em;
}

.account-menu > button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

#account .account-menu > button {
  color: var(--accent);
}

.account-menu .menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 3;
  min-width: max(100%, 11rem);
  padding: 6px 0;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

#account .account-menu .menu {
  left: auto;
  right: 0;
}

.account-menu .menu a,
#account .account-menu .menu a {
  display: block;
  padding: 6px 14px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.account-menu .menu a:hover,
.account-menu .menu a:focus-visible,
#account .account-menu .menu a:hover,
#account .account-menu .menu a:focus-visible {
  color: var(--accent);
  text-decoration: none;
}

h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.lab h2 a,
.taken h2 a {
  color: inherit;
  text-decoration: none;
}

.lab h2 a:hover,
.taken h2 a:hover,
.lab h2 a:focus-visible,
.taken h2 a:focus-visible {
  color: var(--accent);
}

.lab h2 a:focus-visible,
.taken h2 a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

#status,
#own-status,
#set-status,
#repo-note {
  height: 3em;
  margin: 0 0 16px;
  overflow: auto;
  white-space: pre-wrap;
}

#status,
#own-status,
#set-status {
  color: var(--danger);
}

.lab {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px 20px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.lab-text {
  flex: 0 1 auto;
  max-width: min(40rem, 100%);
  min-width: 0;
}

.lab-text .description {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.taken-panel {
  padding: 4px 16px;
  background: #221f1b;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.repo-panel + .repo-panel {
  margin-top: 16px;
}

.repo-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0 0;
}

.repo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}

.repo-panel .repo-name {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.repo-head button {
  padding: 4px 10px;
  color: inherit;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  cursor: pointer;
}

.repo-head button:disabled {
  opacity: 0.5;
  cursor: default;
}

.repo-head button[aria-busy="true"] {
  opacity: 1;
}

.repo-panel .empty {
  margin: 8px 0 12px;
}

.pill {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #1c1915;
  font-size: 12px;
  font-weight: 600;
  vertical-align: 0.15em;
}

a.pill,
.lab-card > h2 a.pill,
.taken h2 a.pill {
  color: #1c1915;
  text-decoration: none;
}

a.pill:hover,
a.pill:focus-visible,
.lab-card > h2 a.pill:hover,
.lab-card > h2 a.pill:focus-visible,
.taken h2 a.pill:hover,
.taken h2 a.pill:focus-visible {
  color: #1c1915;
  text-decoration: none;
}

a.pill:focus-visible,
.lab-card > h2 a.pill:focus-visible,
.taken h2 a.pill:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

#set-form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin: 12px 0;
}

#set-form[hidden] {
  display: none;
}

#set-form .title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px 12px;
}

#set-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
  font-size: 14px;
}

#set-form input {
  font: inherit;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
}

#set-form button {
  padding: 8px 14px;
  color: #1c1915;
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

#set-form button:disabled {
  opacity: 0.5;
  cursor: default;
}

#set-form button[aria-busy="true"] {
  opacity: 1;
}

#set-form button[aria-busy="true"] .spin {
  border-color: rgba(28, 25, 21, 0.35);
  border-top-color: #1c1915;
}

#set-form fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

#set-form legend,
.set-sign h3,
#set-detail .cluster > h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}

#set-form .set-sign label,
.set-sign label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
  color: var(--text);
  font-size: 16px;
}

.set-window {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  gap: 8px 12px;
}

.set-window label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  color: var(--text);
  font-size: 16px;
}

.set-window[hidden] {
  display: none;
}

.set-window .empty {
  flex: 1 1 16rem;
  margin: 0;
}

.set-picked {
  margin: 20px 0 0;
  padding: 12px 16px 8px;
  background: #2a261f;
  border: 1px solid #4a4338;
  border-radius: 8px;
}

.set-picked h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 16px;
}

.set-apply {
  margin-top: 20px;
}

.set-apply button {
  padding: 8px 14px;
  color: #1c1915;
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.set-apply button:disabled {
  opacity: 0.5;
  cursor: default;
}

.set-apply button[aria-busy="true"] {
  opacity: 1;
}

.set-apply button[aria-busy="true"] .spin {
  border-color: rgba(28, 25, 21, 0.35);
  border-top-color: #1c1915;
}

#set-detail .member {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

#set-detail .member p {
  flex: 1 1 12rem;
  margin: 0;
}

#set-detail .member .hint {
  color: var(--muted);
}

#set-detail .member button {
  padding: 4px 10px;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  cursor: pointer;
}

#set-detail .member button.remove {
  padding: 0 2px;
  border: 0;
  background: none;
  color: var(--danger);
  font: 20px/1 "Liberation Sans", "DejaVu Sans", sans-serif;
}

#set-detail .member button.remove:hover,
#set-detail .member button.remove:focus-visible {
  color: var(--text);
  outline: none;
}

#set-detail .member button:disabled {
  opacity: 0.5;
  cursor: default;
}

#set-detail .member button[aria-busy="true"] {
  opacity: 1;
}

.taken-label {
  margin: 8px 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

.taken {
  padding: 8px 0;
}

.taken + .taken {
  border-top: 1px solid var(--line);
}

.taken h2 {
  font-size: 16px;
  line-height: 1.3;
}

.taken .meta {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.3;
}

.profile-tabs {
  margin: 4px 0 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.profile-tabs[hidden] {
  display: none;
}

.role-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px 22px;
}

.author-role {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.author-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.author-tabs[hidden] {
  display: none;
}

.profile-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  color: var(--muted);
  background: none;
  border: 0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.profile-tabs button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.profile-tabs button[aria-selected="true"] {
  color: var(--accent);
}

.author-tabs button {
  font-size: 15px;
}

.author-tabs button[aria-selected="true"] span {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.profile-tabs .kind {
  width: 15px;
  height: 15px;
  flex: none;
}

.profile-tabs button[hidden] {
  display: none;
}

.author-settings {
  margin-top: 0;
}

.author-settings[hidden] {
  display: none;
}

.author-settings h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.author-settings p {
  max-width: 40rem;
  margin: 0 0 8px;
}

.author-settings a {
  color: var(--accent);
}

.repo-form,
#repo-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 12px 0;
}

#repo-form[hidden] {
  display: none;
}

#repo-form label {
  color: var(--muted);
  font-size: 14px;
}

#repo-form input {
  flex: 1 1 16rem;
  min-width: 0;
  padding: 8px 10px;
  color: inherit;
  background: #221f1b;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

#repo-form button {
  padding: 8px 14px;
  color: #1c1915;
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  font: inherit;
  cursor: pointer;
}

#repo-form button:disabled {
  opacity: 0.5;
  cursor: default;
}

#repo-form button[aria-busy="true"] {
  opacity: 1;
}

#repo-form button[aria-busy="true"] .spin {
  border-color: rgba(28, 25, 21, 0.35);
  border-top-color: #1c1915;
}

#repo-list {
  list-style: none;
  margin: 8px 0;
  padding: 0;
}

#repo-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 6px;
}

#repo-list button {
  padding: 4px 10px;
  color: inherit;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  cursor: pointer;
}

#repo-list button:disabled {
  opacity: 0.5;
  cursor: default;
}

#repo-list button[aria-busy="true"] {
  opacity: 1;
}

#repo-key {
  max-width: 40rem;
  margin: 0 0 12px;
}

#repo-key .key-line {
  position: relative;
  margin: 8px 0 4px;
}

#repo-key pre {
  margin: 0;
  padding: 12px 48px 12px 12px;
  white-space: pre-wrap;
  word-break: break-all;
  background: #221f1b;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
}

#repo-key-copy {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--muted);
  background: #2a2622;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}

#repo-key-copy svg {
  width: 16px;
  height: 16px;
  display: block;
}

#repo-key-copy:hover,
#repo-key-copy:focus-visible {
  color: var(--text);
  border-color: var(--accent);
}

#repo-key-copy:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

#repo-key-copy.copied {
  color: var(--accent);
  border-color: var(--accent);
}

#repo-key .key-copied {
  min-height: 0;
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 14px;
}

#repo-key .key-copied[hidden] {
  display: none;
}

#own-summary {
  min-height: 1.5em;
  margin: 0 0 16px;
  color: var(--muted);
}

/* A save note stays muted until the save fails. */
#repo-note {
  color: var(--muted);
}

#repo-note.warn {
  color: var(--danger);
}

#summary {
  margin: 0 0 8px;
  color: var(--muted);
}

.profile #summary:empty {
  display: none;
}

.lab-page {
  position: relative;
}

.lab-page #status:empty {
  display: none;
}

.lab-page #status:not(:empty) {
  position: absolute;
  z-index: 1;
  left: 24px;
  right: 24px;
  height: 1.5em;
  margin: 0;
  overflow: auto;
  background: var(--bg);
}

.lab-page .by,
.lab-page .tags,
.lab-page .badge-note {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.lab-page .description {
  max-width: 40rem;
  margin: 8px 0 16px;
}

.lab-page .rating {
  margin: 12px 0 0;
}

.lab-page .rating-summary {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 14px;
}

.lab-page .stars {
  display: flex;
  gap: 2px;
}

.lab-page .stars button.star {
  border: 0;
  background: transparent;
  padding: 0 2px;
  color: var(--line);
  font-size: 22px;
  line-height: 1;
}

.lab-page .stars button.star[aria-checked="true"] {
  color: var(--accent);
}

.lab-page .stars.is-preview button.star {
  color: var(--line);
}

.lab-page .stars.is-preview button.star[data-lit="true"] {
  color: var(--accent);
}

.lab-page .stars button.star:hover,
.lab-page .stars button.star:focus-visible {
  outline: none;
}

.lab-page .actions {
  margin-top: 20px;
}

.lab-page button {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 14px;
  font: inherit;
  cursor: pointer;
}

.lab-page button:hover,
.lab-page button:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.lab-page button:disabled {
  opacity: 0.5;
  cursor: default;
}

.back {
  display: inline-block;
  margin: 0 0 16px;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}

.back:hover,
.back:focus-visible {
  color: var(--accent);
  outline: none;
}

.lab-card {
  max-width: 48rem;
}

.lab-card > h2 {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 4px;
}

.lab-card > h2 a {
  color: inherit;
  text-decoration: none;
}

.lab-card > h2 a:hover,
.lab-card > h2 a:focus-visible {
  color: var(--accent);
}

.lab-card > h2 a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.badge {
  margin-left: 0.4em;
}

.lab-id,
.byline {
  margin: 0 0 8px;
  color: var(--muted);
}

.lab-card .description {
  margin: 0 0 16px;
}

.lab-card .config-warning {
  margin: 0 0 16px;
  color: var(--danger);
}

.cluster {
  margin: 28px 0 0;
}

.cluster h2,
.cluster h3 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.cluster p {
  margin: 0 0 4px;
}

.cluster .hint {
  color: var(--muted);
}

.cluster .warn {
  color: var(--accent);
  font-weight: 700;
}

.lab button {
  flex: none;
  margin-left: auto;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 14px;
  font: inherit;
  cursor: pointer;
}

.lab button:hover,
.lab button:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.lab button:disabled {
  opacity: 0.5;
  cursor: default;
}

.error,
.empty {
  margin: 0;
  color: var(--muted);
}

.error {
  color: var(--danger);
}

.catalog.starting {
  max-width: 40rem;
}

.starting h1 {
  font-size: 32px;
}

.starting .eyebrow,
.event .eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  animation: runlab-throb 1.2s ease-in-out infinite;
}

@keyframes runlab-throb {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.timer-block {
  margin: 20px 0 0;
}

.timer-block .caption {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.timer {
  margin: 0;
  font-size: 48px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.steps {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
}

.steps li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.steps li.current {
  color: var(--text);
}

.steps .what {
  min-width: 0;
}

.steps .took {
  flex: none;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.steps li.current .took {
  color: var(--accent);
}

.steps .took.done {
  color: #b7c7a3;
}

.starting .error {
  margin-top: 16px;
}

@media (max-width: 700px) {
  .timer {
    font-size: 40px;
  }
}

.intro {
  max-width: 40rem;
  margin: 0 0 16px;
}

.lab-search {
  display: block;
  width: min(24rem, 100%);
  margin: 0;
  appearance: none;
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='6.5' cy='6.5' r='4' fill='none' stroke='%23a39b8d' stroke-width='1.6'/%3E%3Cpath d='M9.6 9.6 13 13' fill='none' stroke='%23a39b8d' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px center;
  background-size: 16px 16px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 14px 8px 36px;
  font: inherit;
}

.lab-search::-webkit-search-decoration,
.lab-search::-webkit-search-results-button,
.lab-search::-webkit-search-results-decoration {
  display: none;
}

.catalog.privacy,
.catalog.about,
.catalog.terms {
  max-width: 40rem;
}

.privacy p,
.about p,
.terms p {
  margin: 0 0 16px;
}

.site-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 24px;
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.site-foot nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 16px;
  margin-left: auto;
}

.site-foot a,
.site-foot [aria-current="page"] {
  color: var(--muted);
  text-decoration: none;
}

.site-foot a:hover,
.site-foot a:focus-visible {
  color: var(--accent);
}

.catalog.event {
  max-width: 52rem;
}

.event h1 {
  font-size: 32px;
}

.event-body {
  display: flex;
  align-items: flex-start;
  gap: 28px 40px;
  margin-top: 24px;
}

.event-main {
  flex: 1 1 22rem;
  min-width: 0;
  max-width: 24rem;
}

.event form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}

.event .steps {
  flex: 1 1 16rem;
  min-width: 0;
  max-width: 20rem;
  margin: 4px 0 0;
  font-size: 14px;
}

.event .steps[hidden] {
  display: none;
}

.event .steps li {
  gap: 12px;
  padding: 6px 0;
}

.event .error {
  margin-top: 16px;
}

.event .live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.event .note {
  margin: 0;
}

.event label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
  font-size: 14px;
}

.event input {
  font: inherit;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
}

.event button {
  align-self: start;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 14px;
  font: inherit;
  cursor: pointer;
}

.event button:hover,
.event button:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.event button:disabled {
  opacity: 0.5;
  cursor: default;
}

.event button[aria-busy="true"] {
  opacity: 1;
}

@media (max-width: 700px) {
  .event-body {
    flex-direction: column;
  }

  .event-main,
  .event .steps {
    max-width: none;
    width: 100%;
  }
}

.please-wait {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 1.5em;
  margin: 0 0 16px;
  overflow: auto;
  color: var(--text);
  font-size: 16px;
}

.please-wait[hidden] {
  display: none;
}

/* Settings keeps this line so the key and the note do not jump when the wait appears. */
#repo-wait[hidden] {
  display: flex;
  visibility: hidden;
}

.please-wait .spin,
button .spin {
  width: 14px;
  height: 14px;
  flex: none;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: runlab-spin 0.8s linear infinite;
}

button .spin {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 8px;
  vertical-align: -2px;
}

@keyframes runlab-spin {
  to { transform: rotate(360deg); }
}

.lab-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 28px;
}

.lab-actions p {
  flex: 1 1 16rem;
  margin: 0;
  color: var(--text);
}

.lab-actions .hint {
  color: var(--muted);
  font-size: 14px;
}

.lab-actions .hint a {
  color: var(--accent);
}

.lab-actions .protect {
  display: flex;
}

.lab-actions button {
  padding: 8px 14px;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  cursor: pointer;
}

.lab-actions button.primary {
  color: #1c1915;
  background: var(--accent);
  border-color: var(--accent);
}

.lab-actions button.locked {
  color: var(--muted);
  border-style: dashed;
}

.lab-actions button.open {
  border-color: var(--accent);
  color: var(--accent);
}

.lab-actions button .lock {
  margin-right: 0.45em;
}

svg.lock {
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
}

#set-detail .set-link .lab-actions {
  margin-top: 12px;
}

#set-detail .set-link .lab-actions button,
#set-detail .set-link .lab-actions button.locked,
#set-detail .set-link .lab-actions button.open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  color: #1c1915;
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

#set-detail .set-link .lab-actions button.open {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

#set-detail .set-link .lab-actions button:disabled {
  opacity: 0.5;
  cursor: default;
}

#set-detail .set-link .lab-actions button svg {
  width: 16px;
  height: 16px;
  flex: none;
}

#set-detail .set-link .lab-actions button svg[hidden] {
  display: none;
}

#set-detail .set-link .copy-link.copied .copied-icon {
  color: #176b34;
}

.lab-actions button:disabled {
  opacity: 0.5;
  cursor: default;
}

.lab-actions button[aria-busy="true"] {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .starting .eyebrow,
  .event .eyebrow,
  .please-wait .spin,
  button .spin {
    animation: none;
  }
}
