/* A person's own settings: a panel per subject, a row per setting, the label and its
   note on the left, the choice on the right. */
article.profile {
  max-width: 46rem;
  margin: 0 auto;
}

article.profile > header {
  margin-bottom: 1.5rem;
}

article.profile > header h1 {
  margin: 0;
}

article.profile > header .meta {
  margin: 0.3rem 0 0;
}

article.profile .panel {
  margin-bottom: 1.25rem;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 10px;
}

article.profile .panel .head {
  padding: 1rem 1.25rem;
}

article.profile .panel .head h2 {
  margin: 0;
  font-size: var(--text-lg);
}

article.profile .panel .head p {
  margin: 0.3rem 0 0;
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--muted);
}

article.profile .field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16rem;
  gap: 0.6rem 1.5rem;
  align-items: center;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--line);
}

article.profile .field label {
  font-size: var(--text-md);
  font-weight: 500;
}

article.profile .field .hint {
  margin: 0.15rem 0 0;
  font-size: var(--text-xs);
  line-height: 1.4;
  color: var(--muted);
}

article.profile .field select {
  width: 100%;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--sheet);
  font-size: var(--text-sm);
}

article.profile .actions {
  margin: 0;
  display: flex;
  justify-content: flex-end;
}

article.profile .field.none {
  display: block;
}

article.profile .field.none p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--muted);
}

article.profile .field .title {
  font-size: var(--text-md);
  font-weight: 500;
}

article.profile .connections {
  grid-template-columns: minmax(0, 1fr);
}

article.profile .connections > div {
  display: grid;
}

article.profile .connections ul {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

article.profile .connections li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: baseline;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--text-sm);
}

article.profile .connections li:last-child {
  border-bottom: 0;
}

article.profile .connections .name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

article.profile .connections li .hint {
  white-space: nowrap;
}

article.profile .connections .hint {
  margin: 0;
}

article.profile .workspaces li label {
  font-size: inherit;
  font-weight: inherit;
}

/* A workspace's switch: on, the person's assistants may open it. */
article.profile .workspaces input[role="switch"] {
  appearance: none;
  position: relative;
  width: 2.25rem;
  height: 1.3rem;
  margin: 0;
  border-radius: 999px;
  background: var(--line);
  cursor: pointer;
  transition: background 0.15s;
}

article.profile .workspaces input[role="switch"]::before {
  content: "";
  position: absolute;
  top: 0.15rem;
  left: 0.15rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--sheet);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.25);
  transition: transform 0.15s;
}

article.profile .workspaces input[role="switch"]:checked {
  background: var(--good);
}

article.profile .workspaces input[role="switch"]:checked::before {
  transform: translateX(0.95rem);
}

article.profile .workspaces input[role="switch"]:focus-visible {
  outline: 2px solid var(--out);
  outline-offset: 2px;
}

article.profile .connections .connect {
  justify-self: start;
  font-size: var(--text-sm);
}

@media (max-width: 640px) {
  article.profile .field {
    grid-template-columns: minmax(0, 1fr);
  }
}
