.metric-card .stat-value {
  font-size: 2rem;
}

.empty-state {
  display: grid;
  place-items: center;
  gap: 0.75rem;
  min-height: 14rem;
  border: 1px dashed var(--color-base-300);
  border-radius: 1rem;
  background: color-mix(in srgb, var(--color-base-100) 80%, transparent);
  text-align: center;
}

.section-stack > * + * {
  margin-top: 1rem;
}

/* Admin surfaces and forms */
.drawer-content {
  background: #f8f8fb;
}

.drawer-content > header {
  box-shadow: 0 1px 0 rgba(148, 148, 148, 0.28);
}

.drawer-side aside {
  box-shadow: 1px 0 0 rgba(148, 148, 148, 0.24);
}

.drawer-side .menu a {
  border-radius: 6px;
  min-height: 2.5rem;
}

.drawer-side .menu a:hover,
.drawer-side .menu a:focus-visible {
  background: #e8f1fe;
  color: #0017c1;
}

.app-card,
.drawer-content .rounded-3xl,
.drawer-content .rounded-2xl {
  border-radius: 8px !important;
}

details.app-card,
.drawer-content .app-card {
  border-color: #d8dee8;
}

details.app-card > summary {
  align-items: center;
  border-radius: 6px;
  color: #111827;
  display: flex;
  gap: 0.75rem;
  line-height: 1.5;
  list-style-position: inside;
  min-height: 2.75rem;
  outline-offset: 3px;
}

details.app-card > summary::marker {
  color: #0017c1;
}

details.app-card[open] > summary {
  margin-bottom: 1rem;
}

.js-api-form {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.js-api-form.border,
.drawer-content .border {
  border-color: #d8dee8 !important;
}

.form-control {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}

.label,
.drawer-content label.label {
  align-items: center;
  display: inline-flex;
  gap: 0.6rem;
  line-height: 1.5;
  min-height: 2.25rem;
}

.label-text {
  color: #1f2937;
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.45;
}

.input,
.select,
.textarea {
  background: #fff;
  border-color: #b8c3cf;
  border-radius: 6px;
  color: #111827;
  width: 100%;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: #3460fb;
  box-shadow: 0 0 0 3px rgba(52, 96, 251, 0.16);
  outline: none;
}

.textarea {
  line-height: 1.7;
  resize: vertical;
}

.rich-text {
  border: 1px solid #b8c3cf;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.rich-text:focus-within {
  border-color: #3460fb;
  box-shadow: 0 0 0 3px rgba(52, 96, 251, 0.16);
}

.rich-text-toolbar {
  align-items: center;
  background: #f8f8fb;
  border-bottom: 1px solid #d8dee8;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.5rem;
}

.rich-text-button,
.rich-text-select {
  border: 1px solid #b8c3cf;
  border-radius: 6px;
  background: #fff;
  color: #111827;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  min-height: 2rem;
}

.rich-text-button {
  min-width: 2.1rem;
  padding: 0 0.55rem;
}

.rich-text-button:hover,
.rich-text-button:focus-visible,
.rich-text-select:hover,
.rich-text-select:focus-visible {
  border-color: #3460fb;
  outline: none;
}

.rich-text-button.is-active,
.rich-text-select.is-active {
  background: #0017c1;
  border-color: #0017c1;
  color: #fff;
}

.rich-text-select {
  padding: 0 0.55rem;
}

.rich-text-editor {
  color: #111827;
  line-height: 1.85;
  min-height: 12rem;
  overflow-wrap: anywhere;
  padding: 0.9rem 1rem;
}

.rich-text-editor:focus {
  outline: none;
}

.rich-text-editor:empty::before {
  color: #6b7280;
  content: attr(data-placeholder);
}

.rich-text-editor h2,
.rich-text-editor h3,
.rich-text-editor h4 {
  font-weight: 800;
  line-height: 1.5;
  margin: 0.8rem 0 0.45rem;
}

.rich-text-editor h2 {
  font-size: 1.25rem;
}

.rich-text-editor h3 {
  font-size: 1.1rem;
}

.rich-text-editor h4 {
  font-size: 1rem;
}

.rich-text-editor p,
.rich-text-editor ul,
.rich-text-editor ol,
.rich-text-editor blockquote {
  margin: 0 0 0.8rem;
}

.rich-text-editor ul,
.rich-text-editor ol {
  padding-left: 1.4rem;
}

.rich-text-editor ul {
  list-style: disc outside;
}

.rich-text-editor ul li::marker {
  content: "・";
}

.rich-text-editor ol {
  list-style: decimal outside;
}

.rich-text-editor li {
  display: list-item;
  margin: 0.15rem 0;
}

.rich-text-editor img,
.prose-lite img {
  border: 1px solid #d8dee8;
  border-radius: 8px;
  display: block;
  height: auto;
  margin: 1rem 0;
  max-width: 100%;
}

.rich-text-editor blockquote {
  border-left: 4px solid #c5d7fb;
  color: #374151;
  padding-left: 0.9rem;
}

.prose-lite ol {
  margin-left: 1.5rem;
  list-style: decimal;
}

.prose-lite blockquote {
  border-left: 4px solid #c5d7fb;
  color: color-mix(in srgb, var(--color-base-content) 72%, transparent);
  padding-left: 1rem;
}

.checkbox {
  border-radius: 5px;
  flex: 0 0 auto;
}

.btn {
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 0;
}

.btn-primary {
  background-color: #0017c1;
  border-color: #0017c1;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: #3460fb;
  border-color: #3460fb;
}

.btn-outline {
  background-color: #fff;
}

.badge {
  border-radius: 999px;
  font-weight: 700;
}

.drawer-content main > div {
  max-width: 80rem;
}

@media (max-width: 767px) {
  .drawer-content main {
    padding-inline: 1rem;
  }

  .js-api-form .grid {
    gap: 0.9rem;
  }

  .drawer-content .btn {
    min-height: 2.5rem;
    white-space: normal;
  }
}

.question-result-correct {
  border-color: color-mix(in srgb, var(--color-success) 35%, transparent);
  background: color-mix(in srgb, var(--color-success) 8%, transparent);
}

.question-result-incorrect {
  border-color: color-mix(in srgb, var(--color-error) 35%, transparent);
  background: color-mix(in srgb, var(--color-error) 8%, transparent);
}
