:root {
  color-scheme: light dark;
  --gap: 12px;
  --radius: 12px;
}

body {
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 15px;
  margin: 0;
  padding: 18px;
  max-width: 720px;
  margin-inline: auto;
  line-height: 1.4;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

h1 {
  font-size: 22px;
  margin: 0;
}

.text-link,
.text-link:visited,
.text-link:hover,
.text-link:active {
  font-size: 18px;
  white-space: nowrap;
  color: rgb(116, 144, 171);
  text-decoration: underline;
  font-weight: 400;
}

.text-link:hover {
  font-weight: 700;
}

label {
  display: block;
  font-weight: 650;
  margin-top: var(--gap);
  margin-bottom: 6px;
}

input,
textarea,
button {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  border-radius: var(--radius);
}

input,
textarea {
  border: 1px solid color-mix(in srgb, CanvasText 25%, transparent);
  background: Canvas;
  color: CanvasText;
  padding: 12px;
}

textarea {
  min-height: 170px;
  resize: vertical;
}

.checkbox-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.checkbox-row input[type="checkbox"] {
  width: auto;
}

.checkbox-row label {
  margin: 0;
  font-weight: 500;
}

.password-input-group {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.password-input-group input {
  flex: 1;
}

.password-input-group button {
  width: auto;
  min-width: 54px;
  margin-top: 0;
  padding: 0 12px;
  font-weight: 650;
}

a {
  color: LinkText;
}

button {
  border: 0;
  padding: 14px 16px;
  font-weight: 750;
  margin-top: 14px;
  background: ButtonFace;
  color: ButtonText;
  border: 1px solid color-mix(in srgb, CanvasText 20%, transparent);
  cursor: pointer;
}

button:hover {
  background: color-mix(in srgb, ButtonFace 88%, black);
}

button.action-button {
  background: rgb(116, 144, 171);
  color: white;
  border: 1px solid rgb(111, 145, 189);
}

button.action-button:hover {
  background: color-mix(in srgb, rgb(116, 144, 171) 86%, black);
}

button.text-link-button {
  width: auto;
  padding: 0;
  margin-top: var(--gap);
  border: 0;
  background: none;
  cursor: pointer;
}

button.text-link-button:hover {
  font-weight: 700;
}

.password-panel {
  margin-top: 8px;
}

.status-message {
  margin-top: 14px;
  padding: 4px 0;
  border-radius: var(--radius);
  background: transparent;
  white-space: pre-wrap;
  word-break: break-word;
  font-weight: 600;
}

.status-message-success {
  color: rgb(38, 122, 68);
}

.status-message-error {
  color: rgb(176, 58, 58);
}

.helper-text {
  opacity: 0.78;
  font-size: 13px;
  margin-top: 8px;
}

.view-panel[hidden] {
  display: none;
}

button.danger-button {
  width: auto;
  min-width: 82px;
  margin-top: 0;
  padding: 0 14px;
  font-weight: 750;
  background: #ff002f71;
  color: white;
  border: 0;
}

button.danger-button:hover {
  background: color-mix(in srgb, #ff002f71 86%, black);
}
