/* ============================================================
   Gradebird — Custom CSS (supplements Tailwind CDN)
   ============================================================ */

/* --- Form elements baseline --- */
input,
textarea,
select {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  padding: 0.6rem 0.75rem;
  font: inherit;
  font-size: 0.875rem;
  background: white;
  color: #102a43;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #338dff;
  box-shadow: 0 0 0 3px rgba(51, 141, 255, 0.1);
}

input[type="checkbox"],
input[type="radio"] {
  width: auto;
  padding: 0;
}

input:invalid,
textarea:invalid,
select:invalid {
  border-color: #f59e0b;
}

label {
  font-weight: 600;
  font-size: 0.875rem;
  color: #334e68;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 0.5rem;
  padding: 0.55rem 1rem;
  border: 1px solid #d1d5db;
  background: white;
  font: inherit;
  font-size: 0.875rem;
  line-height: 1.25;
  font-weight: 600;
  color: #334e68;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn:hover {
  background: #f9fafb;
  border-color: #9fb3c8;
}

.btn-primary {
  background: #1746b6;
  color: white;
  border-color: #1746b6;
}

.btn-primary:hover {
  background: #142757;
}

.btn-danger {
  border-color: #fca5a5;
  color: #991b1b;
  background: #fef2f2;
}

.btn-danger:hover {
  background: #fee2e2;
}

.btn-ghost {
  border: none;
  background: transparent;
  color: #1746b6;
}

.btn-ghost:hover {
  background: #eef7ff;
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Keep legacy .button classes working during transition */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; border-radius: 0.5rem; padding: 0.55rem 1rem; border: 1px solid #d1d5db; background: white; font: inherit; font-size: 0.875rem; line-height: 1.25; font-weight: 600; color: #334e68; cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.button:hover { background: #f9fafb; border-color: #9fb3c8; }
.button.primary { background: #1746b6; color: white; border-color: #1746b6; }
.button.primary:hover { background: #142757; }
.button[disabled],
.button[aria-disabled="true"] {
  background: #cbd5e1;
  color: #f8fafc;
  border-color: #cbd5e1;
  cursor: not-allowed;
  box-shadow: none;
}
.button[disabled]:hover,
.button[aria-disabled="true"]:hover {
  background: #cbd5e1;
  color: #f8fafc;
  border-color: #cbd5e1;
}
.button.danger { border-color: #fca5a5; color: #991b1b; background: #fef2f2; }
.button.danger:hover { background: #fee2e2; }
.button[type="submit"] { position: relative; }

/* --- Card / Panel --- */
.card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

/* Legacy .panel support */
.panel {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  max-width: 860px;
  min-width: 0;
}

.panel.narrow {
  max-width: 560px;
}

.panel.wide {
  max-width: none;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  gap: 1rem;
}

.panel-header h1,
.panel-header h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #102a43;
}

.panel-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.panel-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: #1746b6;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s;
}

.panel-link:hover {
  color: #142757;
  text-decoration: underline;
}

.grading-review-toggle {
  color: #627d98;
}

.grading-review-toggle:hover,
.grading-review-toggle:focus-visible {
  color: #486581;
}

.workflow-overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
  padding: 0.2rem 0 0.1rem;
}

.workflow-overview-copy {
  display: flex;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  flex-wrap: wrap;
}

.workflow-overview-copy p {
  margin: 0;
  color: #486581;
  font-size: 0.95rem;
  line-height: 1.45;
}

.workflow-overview-help {
  width: 1.45rem;
  height: 1.45rem;
  flex: 0 0 1.45rem;
  border: 1px solid #1746b6;
  border-radius: 999px;
  background: transparent;
  color: #1746b6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background-color 0.15s;
  transform: translateY(-0.02rem);
}

.workflow-overview-help:hover,
.workflow-overview-help:focus-visible {
  color: #142757;
  border-color: #142757;
  background: #eff6ff;
  outline: none;
}

.panel-subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: #627d98;
}

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

/* --- Hero sections --- */
.hero {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.hero.compact {
  padding: 1.25rem 1.5rem;
}

.hero h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: #102a43;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

/* --- Page header (replacing hero for most pages) --- */
.page-header {
  margin-bottom: 1.5rem;
}

.page-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #102a43;
  margin: 0 0 0.25rem;
}

.page-header p {
  color: #627d98;
  margin: 0;
  font-size: 0.9rem;
}

/* --- Eyebrow / Lede / Muted --- */
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.7rem;
  font-weight: 700;
  color: #1746b6;
  margin-bottom: 0.35rem;
}

.lede {
  color: #627d98;
  font-size: 0.9rem;
  margin: 0.25rem 0 0;
}

.muted {
  color: #627d98;
  font-size: 0.875rem;
}

#exam-details-panel .helptext,
#exam-details-panel .exam-details-helptext {
  display: block;
  margin-top: 0.28rem;
  color: #627d98;
  font-size: 0.82rem;
  line-height: 1.45;
  font-weight: 400;
}

#exam-details-panel .exam-details-field {
  margin: 0;
}

#exam-details-panel .exam-details-field-inline {
  display: grid;
  grid-template-columns: auto minmax(14rem, 1fr);
  align-items: center;
  column-gap: 0.6rem;
}

#exam-details-panel .exam-details-field-inline .exam-details-helptext,
#exam-details-panel .exam-details-field-inline .form-errors {
  grid-column: 2;
}

#exam-details-panel .exam-details-field-checkbox {
  display: flex;
  align-items: center;
}

#exam-details-panel .exam-details-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-weight: 600;
}

#exam-details-panel .exam-details-checkbox-label input[type="checkbox"] {
  margin: 0;
}

.empty {
  color: #829ab1;
}

/* --- Messages (legacy support) --- */
.messages {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.message {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.message-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.message-error { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }
.message-info { background: #eff6ff; color: #1e40af; border: 1px solid #93c5fd; }
.message-warning { background: #fffbeb; color: #92400e; border: 1px solid #fcd34d; }

/* --- Lists --- */
.list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.list li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.65rem 0.85rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background: #fafafa;
  font-size: 0.875rem;
}

/* --- Grid layouts --- */
.grid {
  display: grid;
  gap: 1.25rem;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grading-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.grading-detail-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.grading-review-queue-strip-panel {
  position: relative;
  margin-bottom: 1.25rem;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(191, 219, 254, 0.45), transparent 34%),
    linear-gradient(180deg, #fbfdff 0%, #f4f8fc 100%);
}

.grading-review-queue-strip-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0;
}

.grading-review-queue-strip-header h2 {
  margin: 0;
  font-size: 1.3rem;
  color: #102a43;
}

.grading-review-queue-strip-subtext {
  margin: 0.35rem 0 0;
}

.grading-review-queue-swiper {
  position: relative;
  z-index: 1;
  overflow: visible;
  margin-top: -0.75rem;
  padding: 0 0 0.75rem;
}

.grading-queue-swiper-pending .grading-review-queue-swiper[data-grading-queue-swiper] {
  opacity: 0;
}

.grading-review-queue-strip-footer {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  margin-top: -0.65rem;
}

.grading-review-queue-slide {
  width: 16rem !important;
  flex-shrink: 0;
  max-width: min(16rem, calc(100vw - 4.5rem));
  padding: 0.35rem 0;
}

.grading-review-queue-card {
  position: relative;
  display: grid;
  gap: 0.8rem;
  align-content: start;
  min-height: 7.25rem;
  padding: 1rem;
  border: 1px solid rgba(186, 199, 213, 0.95);
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 22px 50px -32px rgba(15, 23, 42, 0.55);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.grading-review-queue-card.is-status-reviewed {
  --queue-card-border: rgba(22, 163, 74, 0.34);
  --queue-status-pill-bg: #d1fae5;
  --queue-status-pill-border: #a7f3d0;
  --queue-status-pill-color: #065f46;
}

.grading-review-queue-card.is-status-review-some-ai {
  --queue-card-border: rgba(37, 99, 235, 0.34);
  --queue-status-pill-bg: #dbeafe;
  --queue-status-pill-border: #bfdbfe;
  --queue-status-pill-color: #1746b6;
}

.grading-review-queue-card.is-status-rereview {
  --queue-card-border: rgba(217, 119, 6, 0.36);
  --queue-status-pill-bg: #fef3c7;
  --queue-status-pill-border: #fde68a;
  --queue-status-pill-color: #92400e;
}

.grading-review-queue-card.is-status-review-no-ai {
  --queue-card-border: rgba(245, 158, 11, 0.34);
  --queue-status-pill-bg: #dbeafe;
  --queue-status-pill-border: #bfdbfe;
  --queue-status-pill-color: #1746b6;
}

.grading-review-queue-card:hover,
.grading-review-queue-card:focus-visible {
  transform: translateY(-2px);
  border-color: #93c5fd;
  box-shadow: 0 28px 56px -32px rgba(37, 99, 235, 0.38);
  text-decoration: none;
}

.grading-review-queue-card.is-current {
  border-color: color-mix(in srgb, var(--queue-card-border, #60a5fa) 55%, #60a5fa);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 30px 60px -34px rgba(37, 99, 235, 0.4);
}

.grading-review-queue-card-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.grading-review-queue-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: #e0ecff;
  color: #1d4ed8;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.grading-review-queue-chip-status {
  border: 1px solid var(--queue-status-pill-border, #e2e8f0);
  background: var(--queue-status-pill-bg, #eef2f7);
  color: var(--queue-status-pill-color, #486581);
}

.grading-review-queue-question-marker {
  color: #627d98;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.grading-review-queue-name {
  display: block;
  color: #102a43;
  font-size: 1.08rem;
  line-height: 1.25;
  min-height: 2.7rem;
}

.grading-review-queue-loading-indicator {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
  background: rgba(248, 251, 255, 0.76);
  backdrop-filter: blur(1.5px);
}

.grading-review-queue-spinner {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  border-width: 2px;
  border-style: solid;
  border-color: rgba(37, 99, 235, 0.22);
  border-top-color: #2563eb;
  animation: compile-spin 0.8s linear infinite;
}

.grading-review-queue-card.is-loading {
  pointer-events: none;
}

.grading-review-queue-card.is-loading .grading-review-queue-loading-indicator {
  display: flex;
}

.grading-review-queue-slide:not(.swiper-slide-active) .grading-review-queue-card {
  opacity: 0.72;
}

.grading-detail-hero-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.grading-detail-hero-question-box {
  width: 100%;
  margin-top: 0.15rem;
}

.grading-detail-hero-question-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-bottom: 0.7rem;
}

.grading-detail-hero-question-header strong {
  color: #102a43;
  font-size: 1rem;
  font-weight: 700;
}

.grading-detail-hero-points {
  flex: 0 0 auto;
}

.grading-detail-hero-question-text {
  background: #f7f8fb;
}

.grading-detail-hero-question-text pre {
  margin: 0;
  color: #334e68;
  font-size: 0.98rem;
  line-height: 1.55;
}

.grading-detail-hero-identity-toggle {
  color: #627d98;
}

.grading-detail-header > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.grading-detail-header h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
  color: #102a43;
  line-height: 1.1;
}

.grading-detail-banner {
  margin-bottom: 1rem;
}

.grading-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(25rem, 0.95fr);
  gap: 1.25rem;
  align-items: start;
}

.grading-detail-actions {
  margin-left: auto;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.grading-rubric-header-main {
  display: grid;
  gap: 0.55rem;
  flex: 1 1 auto;
  min-width: 0;
}

.grading-rubric-selector-row {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  min-width: 0;
}

.grading-rubric-selector-summary {
  margin: 0.35rem 0 0;
  min-width: 0;
  color: #627d98;
  font-size: 0.86rem;
  line-height: 1.35;
}

.inline-form.grading-rubric-selector {
  display: grid;
  gap: 0;
  margin: 0;
}

.grading-rubric-selector-row h2 {
  margin: 0;
}

.grading-rubric-selector-row select {
  min-width: 12rem;
  width: auto;
}

.grading-rubric-edit-link {
  white-space: nowrap;
}

.grading-rubric-help {
  flex: 0 0 auto;
}

.grading-rubric-help-modal {
  max-width: 34rem;
}

#grading-rubric-panel .panel-header {
  align-items: flex-start;
}

#grading-rubric-panel .panel-header-actions {
  flex: 0 0 auto;
  align-self: flex-start;
}

@media (max-width: 760px) {
  .grading-rubric-selector-row {
    grid-template-columns: 1fr;
  }

  .grading-rubric-selector-summary {
    grid-column: 1;
  }
}

.grading-detail-main,
.grading-detail-side {
  min-width: 0;
}

.grading-work-sample {
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: #fafafa;
}

.grading-generation-status {
  padding: 0.85rem;
  border: 1px solid #dbeafe;
  border-radius: 0.75rem;
  background: #f8fbff;
}

.grading-candidate-panel {
  display: grid;
  gap: 1rem;
}

.grading-candidate-panel-header {
  align-items: center;
}

.grading-candidate-rubric-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.grading-candidate-rubric-pill-warning {
  background: #fef3c7;
  color: #92400e;
}

.grading-candidate-status {
  display: grid;
  gap: 0.6rem;
  padding: 0.9rem 1rem;
  border: 1px solid #bfdbfe;
  border-radius: 0.9rem;
  background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
}

.grading-candidate-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.grading-candidate-status-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #1d4ed8;
}

.grading-candidate-status-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  background: #2563eb;
  box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.35);
  animation: grading-candidate-pulse 1.4s ease-out infinite;
}

.grading-candidate-status-count {
  font-size: 0.8rem;
  font-weight: 700;
  color: #1e3a8a;
}

.grading-candidate-status-track {
  height: 0.5rem;
  border-radius: 999px;
  background: #dbeafe;
  overflow: hidden;
}

.grading-candidate-status-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #60a5fa 0%, #2563eb 100%);
  transition: width 180ms ease;
}

.grading-candidate-list,
.grading-candidate-secondary-list {
  display: grid;
  gap: 0.75rem;
}

.grading-candidate-item {
  border: 1px solid #e5e7eb;
  border-radius: 0.9rem;
  background: #fafafa;
  overflow: hidden;
}

.grading-candidate-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  cursor: pointer;
  list-style: revert;
}

.grading-candidate-summary-main {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  flex-wrap: wrap;
}

.grading-candidate-summary-agent {
  font-size: 0.88rem;
  font-weight: 700;
  color: #111827;
}

.grading-candidate-summary-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 0.78rem;
  font-weight: 700;
}

.grading-candidate-summary-text {
  min-width: 0;
  flex: 1 1 14rem;
  color: #4b5563;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.grading-candidate-summary-meta {
  flex: 0 0 auto;
  color: #6b7280;
  font-size: 0.76rem;
  white-space: nowrap;
}

.grading-candidate-details {
  display: grid;
  gap: 0.9rem;
  padding: 0.85rem 1rem 1rem;
  border-top: 1px solid #eceff3;
}

.grading-candidate-detail-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grading-candidate-detail-label {
  margin-bottom: 0.25rem;
  color: #6b7280;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.grading-candidate-empty {
  padding: 1rem;
  border: 1px dashed #d1d5db;
  border-radius: 0.9rem;
  background: #fbfbfb;
  color: #6b7280;
  font-size: 0.88rem;
}

.grading-candidate-other-rubrics {
  margin-top: -0.15rem;
}

.grading-candidate-other-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #6b7280;
  font-size: 0.84rem;
}

.grading-candidate-other-toggle:hover {
  color: #4b5563;
}

.grading-candidate-other-toggle-icon {
  display: inline-block;
  width: 0.8rem;
  text-align: center;
}

.grading-candidate-composer {
  padding-top: 0.2rem;
  border-top: 1px solid #eceff3;
}

.grading-candidate-composer-closed {
  display: flex;
  align-items: center;
}

.grading-candidate-add-link {
  font-size: 0.9rem;
}

.grading-candidate-generate-row {
  display: grid;
  gap: 0.7rem;
  margin: 0;
}

.grading-candidate-generate-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.grading-candidate-generate-main {
  flex: 1 1 22rem;
  min-width: 0;
}

.grading-candidate-select-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  width: 100%;
}

.grading-candidate-select-label {
  margin: 0;
  color: #4b5563;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
}

.grading-candidate-select-wrap select,
.grading-candidate-agent-select {
  flex: 1 1 auto;
  min-width: 14rem;
  max-width: 100%;
}

.grading-candidate-generate-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.grading-candidate-errors {
  display: grid;
  gap: 0.35rem;
}

.grading-candidate-status-inline {
  margin: 0;
}

@keyframes grading-candidate-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.35);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

.grading-rubric-selector {
  margin-bottom: 1rem;
}

.grading-queue-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: #fafafa;
}

.grading-queue-copy {
  display: grid;
  gap: 0.2rem;
}

.grading-final-header-copy {
  display: grid;
  gap: 0.25rem;
}

.grading-final-header-subtext {
  margin: 0;
}

.grading-final-summary {
  display: grid;
  gap: 0.7rem;
  padding: 1rem 1.05rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.9rem;
  background: #f7f8fb;
}

.grading-readonly-final {
  margin-top: 0.35rem;
}

.grading-readonly-final .text-sm {
  margin: 0;
}

.grading-final-form {
  gap: 0.75rem;
}

.grading-final-panel {
  scroll-margin-top: 5.25rem;
}

.grading-final-form-header {
  align-items: center;
  margin-bottom: 0;
}

.grading-final-title-row {
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.grading-final-score-field {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex: 0 0 auto;
}

.grading-final-score-field label {
  margin: 0;
}

.grading-final-score-field input[type="number"] {
  width: 6.5rem;
  flex: 0 0 6.5rem;
}

.grading-final-rubric-warning {
  width: fit-content;
}

.grading-final-form p {
  margin: 0;
}

.grading-final-form p label {
  display: inline-block;
  margin-bottom: 0.3rem;
}

.grading-final-form textarea {
  min-height: 7.5rem;
}

.grading-final-form textarea,
.grading-final-form input[type="text"],
.grading-final-form input[type="number"] {
  background: rgba(255, 255, 255, 0.96);
}

.grading-final-upgrade-note {
  padding: 0.8rem 0.95rem;
  border: 1px solid #f3e0a3;
  border-radius: 0.8rem;
  background: #fff9e8;
  color: #7c5a10;
  font-size: 0.92rem;
  line-height: 1.45;
}

.grading-final-form .hero-actions {
  justify-content: flex-start;
  margin-top: 0.2rem;
}

.grading-rubric-publish-row {
  display: flex;
  align-items: end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.grading-rubric-publish-label {
  flex: 1 1 14rem;
}

[x-cloak] {
  display: none !important;
}

.grading-rubric-form.htmx-request .grading-rubric-publish-button {
  opacity: 0.96;
  pointer-events: none;
}

.grading-rubric-form.htmx-request .grading-rubric-publish-button .button-spinner {
  display: inline-block;
}

.grading-rubric-form.htmx-request .grading-rubric-publish-button .button-label {
  display: none;
}

.grading-rubric-form.htmx-request .grading-rubric-publish-button .button-label-loading {
  display: inline;
}

.grading-final-form.htmx-request .grading-final-save-button {
  opacity: 0.96;
  pointer-events: none;
}

.grading-final-form.htmx-request .grading-final-save-button .button-spinner {
  display: inline-block;
}

.grading-final-form.htmx-request .grading-final-save-button .button-label {
  display: none;
}

.grading-final-form.htmx-request .grading-final-save-button .button-label-loading {
  display: inline;
}

.grading-live-generate-form.htmx-request .grading-live-generate-button {
  opacity: 0.96;
  pointer-events: none;
}

.grading-live-generate-form.htmx-request .grading-live-generate-button .button-spinner {
  display: inline-block;
}

.grading-live-generate-form.htmx-request .grading-live-generate-button .button-label {
  display: none;
}

.grading-live-generate-form.htmx-request .grading-live-generate-button .button-label-loading {
  display: inline;
}

.grading-live-generate-form.htmx-request .grading-candidate-status {
  opacity: 0.8;
}

.grading-batch-table td,
.grading-batch-table th {
  min-width: 0;
}

@media (max-width: 760px) {
  .grading-review-queue-strip-header {
    flex-direction: column;
  }

  .grading-review-queue-swiper {
    margin-top: 0.35rem;
  }

  .grading-review-queue-strip-footer {
    margin-top: 0.1rem;
  }

  .grading-review-queue-slide {
    width: 13.5rem !important;
    max-width: min(13.5rem, calc(100vw - 3.5rem));
  }

  .grading-detail-hero {
    flex-direction: column;
  }

  .grading-candidate-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .grading-candidate-summary-meta {
    white-space: normal;
  }

  .grading-candidate-detail-grid {
    grid-template-columns: 1fr;
  }

  .grading-candidate-generate-controls {
    align-items: stretch;
  }

  .grading-candidate-select-wrap {
    flex-wrap: wrap;
  }

  .grading-candidate-generate-actions {
    width: 100%;
  }
}

.grading-batch-question {
  display: grid;
  gap: 0.35rem;
}

.grading-batch-select {
  min-width: 14rem;
  max-width: 100%;
}

.grading-batch-stats {
  display: grid;
  gap: 0.35rem;
  font-size: 0.875rem;
}

.grading-agent-checklist {
  display: grid;
  gap: 0.4rem;
  min-width: 14rem;
}

.grading-agent-option {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.875rem;
}

.grading-review-table-wrap {
  overflow-x: auto;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
}

.grading-review-table {
  display: inline-table;
  width: max-content;
  min-width: max-content;
  max-width: none;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.85rem;
  table-layout: auto;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  overflow: hidden;
}

.grading-review-table th,
.grading-review-table td {
  padding: 0.5rem 0.28rem;
  border-bottom: 1px solid #f3f4f6;
  border-right: 1px solid #f3f4f6;
  text-align: center;
  vertical-align: middle;
}

.grading-review-table thead th {
  position: sticky;
  top: 0;
  background: #fafafa;
  z-index: 1;
}

.grading-review-table th:first-child {
  position: sticky;
  left: 0;
  text-align: left;
  background: #fafafa;
  z-index: 2;
  min-width: 13rem;
  width: 13rem;
}

.grading-review-question-column {
  width: 4.2rem;
  min-width: 4.2rem;
}

.grading-review-table td:last-child,
.grading-review-table th:last-child {
  border-right: 0;
}

.grading-review-table tbody tr:last-child td,
.grading-review-table tbody tr:last-child th {
  border-bottom: 0;
}

.grading-review-student {
  display: flex;
  align-items: center;
  min-width: 0;
}

.grading-review-student-line {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.grading-review-student-line strong {
  line-height: 1.2;
}

.grading-packet-status-info {
  background: #dbeafe;
  color: #1746b6;
}

.grading-packet-status-muted {
  background: #f3f4f6;
  color: #52606d;
}

.grading-review-cell {
  white-space: nowrap;
  width: 4.2rem;
  min-width: 4.2rem;
  padding: 0.3rem 0.08rem;
}

.grading-review-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.18rem;
  text-decoration: none;
  color: inherit;
}

.grading-review-link-static {
  cursor: default;
  text-decoration: none;
}

.grading-review-symbol {
  display: inline-block;
  min-width: 1rem;
  max-width: 100%;
  font-size: 0.94rem;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1;
}

.grading-review-ai-symbol {
  text-decoration: none;
}

.grading-review-ai-symbol svg {
  display: block;
  width: 1.55rem;
  height: 1.55rem;
  overflow: visible;
}

.grading-review-ai-symbol text {
  fill: #ffffff;
  font-size: 9.75px;
  font-weight: 800;
  font-family: ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.02em;
}

.grading-review-rubric-symbol {
  text-decoration: none;
}

.grading-review-rubric-symbol svg {
  display: block;
  width: 1.45rem;
  height: 1.45rem;
  overflow: visible;
}

.grading-review-rubric-symbol text {
  fill: #ffffff;
  font-size: 8.9px;
  font-weight: 800;
  font-family: ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.02em;
}

.grading-summary-count-reviewed {
  color: #16a34a !important;
}

.grading-summary-count-rereview {
  color: #d97706 !important;
}

.grading-summary-count-review-no-ai {
  color: #2563eb !important;
}

.grading-summary-count-review-with-ai {
  color: #2563eb !important;
}

.grading-summary-count-blocked {
  color: #9ca3af !important;
}

.scan-summary-stats .grading-summary-count-reviewed,
.scan-summary-stats .grading-summary-count-rereview,
.scan-summary-stats .grading-summary-count-review-no-ai,
.scan-summary-stats .grading-summary-count-review-with-ai,
.scan-summary-stats .grading-summary-count-blocked {
  font-weight: 800;
}

.grading-review-symbol-reviewed {
  color: #15803d;
  font-size: 1.22rem;
  font-weight: 800;
}

.grading-review-symbol-review_no_ai {
  color: #2563eb;
  opacity: 0.45;
}

.grading-review-symbol-review_some_ai {
  color: #1d4ed8;
}

.grading-review-symbol-rereview {
  color: #d97706;
}

.grading-review-symbol-blocked {
  color: #9ca3af;
}

.grading-review-symbol-generating-active {
  background-size: 200% 100%;
  animation: grading-batch-progress-pulse 1.5s linear infinite;
}

.grading-review-warning-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1rem;
  height: 1rem;
  border-radius: 999px;
  color: #b45309;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
}

@media (max-width: 720px) {
  .grading-batch-table {
    width: max-content;
    min-width: 48rem;
  }

  .grading-batch-select {
    min-width: 9rem;
  }

  .grading-agent-checklist {
    min-width: 10rem;
  }

  .grading-review-table {
    min-width: max-content;
  }

  .grading-review-table th:first-child {
    min-width: 11rem;
    width: 11rem;
  }

  .grading-review-symbol {
    min-width: 1rem;
  }
}

/* --- Stack --- */
.stack {
  display: grid;
  gap: 0.75rem;
}

/* --- Tables --- */
.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.roster-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.roster-table th,
.roster-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: middle;
}

.roster-table th:nth-child(3),
.roster-table td:nth-child(3) {
  text-align: left !important;
}

.roster-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #627d98;
  font-weight: 700;
}

.table-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* --- Roster --- */
.roster-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.roster-stat-card {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.85rem;
  background: white;
}

.roster-stat-card strong {
  display: block;
  font-size: 1.5rem;
  color: #102a43;
}

.roster-stat-card span {
  font-size: 0.8rem;
  color: #627d98;
}

.roster-table-shell { margin-top: 0; }
.roster-table td:last-child { white-space: nowrap; }
.roster-table .table-actions {
  align-items: center;
  gap: 0.15rem;
  flex-wrap: nowrap;
}
.roster-student-edit-form {
  gap: 0.85rem;
}
.roster-student-edit-form .grid.two {
  gap: 0.8rem 1rem;
}
.roster-student-edit-field {
  min-width: 0;
}
.roster-student-edit-field label {
  display: block;
  margin-bottom: 0.35rem;
}
.roster-student-edit-form input[type="text"],
.roster-student-edit-form input[type="email"],
.roster-student-edit-form input[type="number"] {
  padding: 0.45rem 0.6rem;
  min-height: 2.35rem;
}
.roster-student-edit-form .checkbox-row {
  margin-top: -0.1rem;
}
.roster-student-edit-form .table-actions {
  gap: 0.5rem;
}
.roster-section-list {
  color: #52667a;
  line-height: 1.45;
}
.roster-student-status {
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}
.roster-student-status-active { color: #486581; }
.roster-student-status-inactive { color: #9a3412; }
.roster-table-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #52667a;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.roster-table-icon-button:hover {
  background: #f8fafc;
  color: #334e68;
}
.roster-table-icon-button:focus-visible {
  outline: 2px solid #cbd5e1;
  outline-offset: 2px;
}
.roster-table-icon-button svg {
  width: 1rem;
  height: 1rem;
}
.roster-table-icon-button-close {
  font-size: 1rem;
  line-height: 1;
  color: #7b8794;
}
.roster-table-icon-button-close:hover {
  background: #f8fafc;
  color: #52667a;
}
.roster-table-shell .dt-container {
  width: 100%;
}
.roster-table-shell .dt-layout-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0;
}
.roster-table-shell .dt-layout-row:first-child .dt-layout-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  flex: 0 0 auto;
}
.roster-table-shell .dt-layout-row:first-child .dt-start {
  margin-right: auto;
}
.roster-table-shell .dt-layout-row:first-child .dt-end {
  margin-left: auto;
}
.roster-table-shell .dt-length,
.roster-table-shell .dt-search {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #52667a;
  font-size: 0.8rem;
  font-weight: 600;
}
.roster-table-shell .dt-length label,
.roster-table-shell .dt-search label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  white-space: nowrap;
}
.roster-table-shell .dt-search {
  margin-left: 0;
}
.roster-table-shell .dt-input {
  min-height: 2rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.65rem;
  background: #fff;
  color: #102a43;
  box-shadow: none;
}
.roster-table-shell select.dt-input {
  width: auto !important;
  min-width: 4.25rem;
  max-width: 4.75rem;
  padding: 0.3rem 1.75rem 0.3rem 0.55rem;
  flex: 0 0 auto;
}
.roster-table-shell input.dt-input {
  width: 12rem !important;
  min-width: 12rem;
  max-width: 12rem;
  padding: 0.35rem 0.55rem;
  flex: 0 0 auto;
}
.roster-table-shell .dt-input:focus {
  outline: 2px solid rgba(37, 99, 235, 0.16);
  outline-offset: 1px;
  border-color: #93c5fd;
}
.roster-review-counts { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.roster-review-row-error { background: rgba(245, 158, 11, 0.04); }
.roster-review-action { display: grid; gap: 0.25rem; align-content: start; }
.roster-review-table td { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.roster-review-inline-meta { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.25rem; }
.roster-section-table td { vertical-align: middle; }
.roster-section-inline-form { display: flex; align-items: center; gap: 0.5rem; }

/* --- Checkbox --- */
.checkbox-row { display: inline-flex; align-items: center; gap: 0.5rem; }
.checkbox-list ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
.checkbox-list label { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 500; flex-wrap: wrap; }
.roster-sections-checkbox-list > div {
  column-width: 12rem;
  column-gap: 1.25rem;
  display: block;
}
.roster-sections-checkbox-list > div > div {
  break-inside: avoid;
  margin: 0 0 0.4rem;
}
.roster-student-edit-form .roster-sections-checkbox-list > div {
  column-width: 9rem;
  column-gap: 1rem;
}
.roster-student-edit-form .roster-sections-checkbox-list label {
  font-weight: 500;
  margin-bottom: 0;
}

/* --- Batch selection --- */
.batch-selection-tools { display: grid; gap: 0.75rem; }
.batch-selection-visibility-panel {
  display: grid;
  gap: 1rem;
  padding: 0.85rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: #fafafa;
}
.batch-selection-visibility-grid {
  display: grid;
  grid-template-columns: minmax(15rem, 18rem) minmax(0, 1fr);
  gap: 1rem 1.5rem;
  align-items: start;
}
.batch-selection-visibility-group {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}
.batch-selection-group-title {
  margin: 0;
  color: #102a43;
  font-size: 0.95rem;
  font-weight: 700;
}
.batch-selection-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.batch-selection-section-tip { margin: -0.15rem 0 0; }
.batch-selection-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.batch-selection-inline-filter { display: inline-flex; align-items: center; gap: 0.45rem; flex: 0 0 auto; white-space: nowrap; }
.batch-selection-inline-filter label { margin: 0; white-space: nowrap; }
.batch-selection-inline-filter select { width: auto; min-width: 10rem; }
.batch-selection-inline-label { margin-right: 0; }
.batch-selection-results-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
  margin: 0.9rem 0 1rem;
}
.batch-selection-results-bar [data-selection-summary] { margin: 0; }
.batch-section-list { margin-top: 0.4rem; margin-bottom: 0.5rem; max-height: 10rem; overflow: auto; }
.batch-section-list ul {
  display: block;
  columns: 12rem;
  column-gap: 1rem;
}
.batch-section-list li {
  break-inside: avoid;
  margin: 0 0 0.35rem;
}
#printing-student-list ul {
  display: block;
  columns: 20rem;
  column-gap: 1.2rem;
}
#printing-student-list li {
  min-width: 0;
  break-inside: avoid;
  margin: 0 0 0.45rem;
}
#printing-student-list label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: nowrap;
  white-space: nowrap;
  line-height: 1.2;
  width: 100%;
  overflow: hidden;
}
#printing-student-list label > span { overflow: hidden; text-overflow: ellipsis; }
#printing-student-list input[type="checkbox"] { margin-top: 0; flex: 0 0 auto; }
.printing-batched-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  color: #15803d;
  flex: 0 0 auto;
}
.printing-batched-indicator-check { font-weight: 800; }
.printing-batched-indicator-labels { font-weight: 400; }

/* --- Dashboard --- */
.dashboard-section-intro { margin: 0.25rem 0 0; }

.dashboard-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 0.75rem;
}

.dashboard-card {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: white;
  transition: box-shadow 0.15s;
}

.dashboard-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.dashboard-card h3 { margin: 0; font-size: 1.05rem; }
.dashboard-card-header { display: flex; justify-content: space-between; gap: 0.75rem; align-items: start; }
.dashboard-card-header .eyebrow { margin-top: 0; }
.dashboard-card-body > :first-child { margin-top: 0; }
.dashboard-card-body > :last-child { margin-bottom: 0; }

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.dashboard-stat {
  padding: 0.65rem;
  border-radius: 0.5rem;
  background: #eef7ff;
}

.dashboard-stat strong,
.dashboard-stat span { display: block; }
.dashboard-stat strong { font-size: 1.1rem; color: #102a43; }
.dashboard-stat span { margin-top: 0.15rem; color: #627d98; font-size: 0.8rem; }

.dashboard-inline-note {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  padding: 0.5rem 0.7rem;
  border: 1px solid #dbeafe;
  border-radius: 0.5rem;
  background: #f0f7ff;
  font-size: 0.875rem;
}

.dashboard-note-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #1746b6;
}

.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dashboard-empty {
  padding: 1.25rem;
  border-radius: 0.5rem;
  border: 1px dashed #d1d5db;
  background: #fafafa;
}

/* --- Course detail redesign --- */
.course-workspace-shell {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1.15rem;
  padding: 0.2rem 0 0.2rem;
  width: 100%;
}

.course-workspace-main {
  max-width: 100%;
  padding: 1rem 0 2rem;
}

.course-workspace-container {
  max-width: 96rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.course-header-card {
  display: grid;
  gap: 0.55rem;
}

.course-header-copy {
  display: grid;
  gap: 0.5rem;
}

.course-header-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.75rem;
}

.course-header-title-block {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.course-header-title-inline {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.course-header-title {
  margin: 0;
  color: #102a43;
  font-size: clamp(1.55rem, 2.4vw, 2rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.course-header-meta {
  margin: 0;
  color: #52606d;
  font-size: 0.92rem;
  line-height: 1.4;
}

.course-header-edit-link {
  font-size: 0.8rem;
}

.course-header-edit-card {
  background: rgba(255, 255, 255, 0.95);
  border-color: #d9e2ec;
}

.course-workspace-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0;
  padding-top: 0.4rem;
}

.course-workspace-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.4rem;
  padding: 0.55rem 0.95rem;
  border: 1px solid #d9e2ec;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #486581;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.course-workspace-nav-link:hover,
.course-workspace-nav-link:focus-visible {
  color: #1746b6;
  border-color: #bfd3ea;
  background: #f8fbff;
  box-shadow: 0 0 0 3px rgba(23, 70, 182, 0.08);
  outline: none;
}

.course-workspace-nav-link.is-current {
  color: #0f172a;
  border-color: #93c5fd;
  background: linear-gradient(180deg, #eff6ff 0%, #f8fbff 100%);
}

.course-workspace-shell-help {
  margin: -0.05rem 0 0;
  color: #486581;
  font-size: 0.88rem;
  line-height: 1.45;
  max-width: 56rem;
}

.course-overview-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.course-overview-hero-copy {
  display: grid;
  gap: 0.35rem;
  max-width: 48rem;
}

.course-overview-eyebrow {
  margin: 0;
  color: #486581;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.course-overview-hero h2 {
  margin: 0;
  color: #102a43;
  font-size: clamp(1.3rem, 2.1vw, 1.9rem);
  line-height: 1.1;
}

.course-overview-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.course-overview-stat-card {
  display: grid;
  gap: 0.2rem;
  padding: 1rem 1.05rem;
  border: 1px solid #d9e2ec;
  border-radius: 1rem;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.course-overview-stat-card strong {
  color: #102a43;
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1;
}

.course-overview-stat-card span {
  color: #486581;
  font-size: 0.82rem;
  line-height: 1.45;
}

.course-overview-stat-label {
  margin: 0;
  color: #627d98;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.course-overview-grid,
.course-workspace-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.course-workspace-panel {
  display: grid;
  gap: 0.8rem;
  align-content: start;
  padding: 1rem;
  border: 1px solid #d9e2ec;
  border-radius: 1rem;
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 12px 30px rgba(16, 42, 67, 0.04);
}

.course-exams-panel {
  max-width: 52rem;
}

.course-agents-panel {
  max-width: 52rem;
}

#course-exams-table {
  gap: 0;
}

.organization-dashboard-full-width {
  grid-column: 1 / -1;
}

.course-workspace-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 0.75rem;
}

.course-workspace-panel-copy {
  display: grid;
  gap: 0.2rem;
}

.course-workspace-panel-header h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: #102a43;
}

.course-workspace-summary {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: #486581;
}

.course-workspace-table {
  display: grid;
  gap: 0.5rem;
  align-content: start;
}

.course-workspace-table-row {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid #e5e7eb;
}

.course-workspace-table-main,
.course-workspace-table-side {
  display: grid;
  gap: 0.15rem;
}

.course-workspace-table-main {
  min-width: 0;
}

.course-workspace-table-side {
  justify-items: end;
  text-align: right;
}

.course-workspace-table-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #102a43;
  word-break: break-word;
}

.course-workspace-table-subtitle,
.course-workspace-table-note {
  font-size: 0.78rem;
  color: #627d98;
  word-break: break-word;
}

.course-workspace-table-value {
  font-size: 0.88rem;
  font-weight: 700;
  color: #102a43;
}

.course-workspace-table-empty {
  padding-top: 0.65rem;
  border-top: 1px solid #e5e7eb;
  font-size: 0.88rem;
  color: #627d98;
}

.course-workspace-table-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid #d9e2ec;
  color: #1746b6;
  font-size: 0.9rem;
  font-weight: 700;
}

.dashboard-exam-create-row .course-workspace-table-link-row {
  border-top: 0;
  padding-top: 0;
}

.course-workspace-table-link-row:hover {
  color: #142757;
}

.course-workspace-table-link-text {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.course-workspace-table-link-icon {
  font-size: 1rem;
}

.course-overview-exam-list {
  display: grid;
  gap: 0.75rem;
}

.course-overview-exam-card {
  display: grid;
  gap: 0.65rem;
  padding: 0.95rem 1rem;
  border: 1px solid #d9e2ec;
  border-radius: 0.95rem;
  background: #fbfdff;
}

.course-overview-exam-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.course-overview-exam-topline h3 {
  margin: 0;
  color: #102a43;
  font-size: 1rem;
  font-weight: 800;
}

.course-overview-exam-meta {
  margin: 0;
  color: #486581;
  font-size: 0.84rem;
}

.course-overview-step-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.course-overview-step-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 1.9rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 0.76rem;
  font-weight: 700;
}

.course-overview-step-pill.is-complete {
  background: #dcfce7;
  color: #166534;
}

.course-overview-step-pill.is-current,
.course-overview-step-pill.is-available {
  background: #dbeafe;
  color: #1d4ed8;
}

.course-overview-step-pill.is-blocked {
  background: #fee2e2;
  color: #b91c1c;
}

.course-overview-exam-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.dashboard-exam-row {
  align-items: flex-start;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.dashboard-exam-main {
  gap: 0.6rem;
}

.dashboard-exam-main-inline {
  display: block;
  width: 100%;
}

.dashboard-exam-copy {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  flex: 1 1 auto;
}

.dashboard-exam-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.dashboard-exam-header-row-compact {
  align-items: flex-start;
}

.dashboard-exam-inline-summary {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  flex: 1 1 auto;
}

.dashboard-exam-title-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  min-width: 0;
}

.dashboard-exam-title-row-inline {
  flex: 1 1 auto;
  min-width: 0;
}

.dashboard-exam-edit-button {
  font-size: 0.78rem;
}

.dashboard-exam-links {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.dashboard-exam-links-inline {
  flex: 0 0 auto;
}

.dashboard-exam-links .provider-delete-button {
  color: #52667a;
  width: 1.75rem;
  height: 1.75rem;
}

.dashboard-exam-links .provider-delete-button:hover {
  background: #f8fafc;
  color: #334e68;
}

.exam-delete-shell {
  display: flex;
  justify-content: center;
}

.exam-delete-card {
  width: min(100%, 44rem);
}

.exam-delete-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #102a43;
}

.exam-delete-warning {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
}

.exam-delete-warning p {
  margin: 0;
}

.exam-delete-stats {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.exam-delete-stat {
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 0.88rem;
}

.exam-delete-stat-empty {
  background: #f8fafc;
  border-color: #d9e2ec;
  color: #52667a;
}

.dashboard-exam-edit-shell {
  width: 100%;
}

.dashboard-exam-edit-form {
  display: grid;
  gap: 0.45rem;
  width: 100%;
}

.dashboard-exam-edit-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.dashboard-exam-edit-row input[type="text"] {
  flex: 1 1 18rem;
  max-width: 28rem;
}

.dashboard-exam-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 600;
}

.dashboard-exam-nav-link-muted {
  color: #9aa5b1;
  cursor: default;
  text-decoration: none;
}

.dashboard-exam-nav-link-muted:hover {
  color: #9aa5b1;
}

.dashboard-exam-link-icon {
  font-size: 0.72rem;
  line-height: 1;
}

.dashboard-exam-link-icon-placeholder {
  visibility: hidden;
}

.dashboard-exam-inline-meta {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: #627d98;
  font-size: 0.8rem;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
}

#dashboard-exam-list {
  display: grid;
  gap: 0;
}

#dashboard-agent-list {
  display: grid;
  gap: 0;
}

.dashboard-agent-row {
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.agent-badge {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
}

.dashboard-agent-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.dashboard-agent-title-row,
.dashboard-agent-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.dashboard-agent-links {
  justify-content: flex-end;
}

.dashboard-agent-debug-link {
  font-size: 0.8rem;
}

.dashboard-agent-links .provider-delete-button {
  width: 1.75rem;
  height: 1.75rem;
  color: #52667a;
}

.dashboard-agent-links .provider-delete-button:hover {
  background: #f8fafc;
  color: #334e68;
}

.dashboard-agent-links .provider-delete-button:focus-visible {
  outline-color: #cbd5e1;
}

.dashboard-agent-row-archived {
  background: #f8fafc;
}

.dashboard-agent-edit-shell {
  width: 100%;
}

.dashboard-agent-edit-form {
  display: grid;
  gap: 0.65rem;
  width: 100%;
}

.dashboard-agent-edit-header {
  align-items: flex-start;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
}

.dashboard-agent-edit-title h3,
.dashboard-agent-edit-title p {
  margin: 0;
}

.dashboard-agent-hide-link {
  font-size: 0.82rem;
  white-space: nowrap;
}

.dashboard-agent-create-row .course-workspace-table-link-row {
  border-top: 0;
  padding-top: 0;
}

.dashboard-agent-archived-shell {
  margin-top: 0.8rem;
}

.dashboard-agent-archived-toggle {
  display: flex;
  justify-content: flex-end;
  padding-top: 0.35rem;
}

.dashboard-agent-archived-link {
  color: #7b8794;
  font-size: 0.82rem;
}

.dashboard-agent-archived-link:hover {
  color: #52667a;
}

.dashboard-agent-archived-list {
  display: grid;
  gap: 0;
  margin-top: 0.35rem;
}

.dashboard-agent-archived-badge {
  background: #e2e8f0;
  color: #52667a;
}

.agent-card-archived {
  background: #f8fafc;
}

.provider-table {
  display: grid;
  gap: 0;
  width: 100%;
}

.provider-table-header,
.provider-table-row {
  display: grid;
  grid-template-columns: minmax(13rem, 1.2fr) minmax(10rem, 0.8fr) minmax(22rem, 2.2fr) minmax(7rem, 0.8fr) auto;
  gap: 1rem;
  align-items: start;
}

.provider-table-header {
  padding: 0 0 0.7rem;
  border-bottom: 1px solid #d9e2ec;
  color: #627d98;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.provider-table-row {
  width: 100%;
  padding: 0.95rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.provider-table-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.provider-table-empty {
  padding: 0.9rem 0 0;
  color: #627d98;
  font-size: 0.9rem;
}

.usage-table {
  display: grid;
  gap: 0;
  width: 100%;
}

.usage-table-header,
.usage-table-row {
  display: grid;
  grid-template-columns: minmax(10rem, 1fr) minmax(12rem, 1.1fr) minmax(12rem, 1.1fr) minmax(14rem, 1.3fr) minmax(18rem, 1.8fr) minmax(7rem, 0.7fr);
  gap: 1rem;
  align-items: start;
}

.usage-table-header {
  padding: 0 0 0.7rem;
  border-bottom: 1px solid #d9e2ec;
  color: #627d98;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.usage-table-row {
  padding: 0.95rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.usage-table-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.usage-table-cell {
  min-width: 0;
  display: grid;
  gap: 0.25rem;
}

.usage-table-cost {
  justify-items: end;
  text-align: right;
}

.provider-usage-summary-table {
  display: grid;
  gap: 0;
  width: 100%;
}

.provider-usage-summary-header,
.provider-usage-summary-row {
  display: grid;
  grid-template-columns: minmax(10rem, 1.5fr) minmax(7rem, 0.9fr) minmax(7rem, 0.9fr) minmax(8rem, 1fr);
  gap: 0.9rem;
  align-items: start;
}

.provider-usage-summary-header {
  padding: 0 0 0.7rem;
  border-bottom: 1px solid #d9e2ec;
  color: #627d98;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.provider-usage-summary-row {
  padding: 0.9rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.provider-usage-summary-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.provider-usage-summary-cell {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
}

.provider-row-disabled {
  opacity: 0.72;
}

.provider-row-title-group {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.provider-row-title-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.provider-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
}

.provider-table-cell {
  min-width: 0;
}

.provider-table-models {
  display: grid;
  gap: 0.35rem;
}

.provider-table-provider {
  display: flex;
  align-items: flex-start;
}

.provider-model-list {
  color: #102a43;
  font-size: 0.84rem;
  line-height: 1.45;
  word-break: break-word;
}

.provider-model-list-empty {
  color: #627d98;
}

.provider-pricing-list {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid #e5e7eb;
}

.provider-pricing-item,
.provider-pricing-form {
  display: grid;
  gap: 0.45rem;
}

.provider-pricing-copy {
  display: grid;
  gap: 0.35rem;
}

.provider-pricing-form-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.provider-pricing-field {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.provider-pricing-field-full {
  grid-column: 1 / -1;
}

.provider-pricing-field-notes {
  align-content: start;
}

.provider-pricing-field-notes textarea {
  min-height: 5.5rem;
  resize: vertical;
}

.provider-pricing-field label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #102a43;
}

.provider-pricing-field .helptext {
  font-size: 0.74rem;
  line-height: 1.3;
  color: #7b8794;
}

.organization-pricing-panel {
  min-width: 0;
}

.provider-pricing-table {
  display: grid;
  gap: 0;
  width: 100%;
}

.provider-pricing-table-header,
.provider-pricing-table-row {
  display: grid;
  grid-template-columns: minmax(10rem, 1.5fr) minmax(5.5rem, 0.8fr) minmax(5.5rem, 0.8fr) minmax(6.5rem, 0.9fr) auto;
  gap: 0.85rem;
  align-items: start;
}

.provider-pricing-table-header {
  padding: 0 0 0.7rem;
  border-bottom: 1px solid #d9e2ec;
  color: #627d98;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.provider-pricing-table-row {
  padding: 0.9rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.provider-pricing-table-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.provider-pricing-table-cell {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
}

.provider-pricing-rate-cell {
  justify-items: start;
  text-align: left;
}

.provider-pricing-actions-cell {
  justify-items: end;
}

.provider-pricing-table-row-editing {
  grid-template-columns: 1fr;
}

.provider-pricing-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #102a43;
}

.provider-pricing-toggle input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: #2563eb;
  flex: 0 0 auto;
}

.provider-pricing-toggle span {
  line-height: 1.3;
}

.provider-pricing-field input[type="number"] {
  min-width: 0;
}

.provider-pricing-create {
  padding-top: 0.25rem;
}

.provider-table-status {
  display: flex;
  align-items: flex-start;
}

.provider-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1;
  border: 1px solid transparent;
}

.provider-status-pill-enabled {
  background: #ecfdf3;
  border-color: #b7ebc6;
  color: #166534;
}

.provider-status-pill-disabled {
  background: #f8fafc;
  border-color: #d9e2ec;
  color: #52606d;
}

.provider-table-actions {
  display: flex;
  justify-content: flex-end;
}

.provider-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.provider-row-actions form {
  margin: 0;
}

.provider-delete-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #991b1b;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.provider-delete-button:hover {
  background: #fef2f2;
  color: #7f1d1d;
}

.provider-delete-button:focus-visible {
  outline: 2px solid #fca5a5;
  outline-offset: 2px;
}

.provider-delete-button svg {
  width: 1.05rem;
  height: 1.05rem;
}

.printing-batch-archive-button {
  color: #52667a;
}

.printing-batch-archive-button:hover {
  background: #f8fafc;
  color: #334e68;
}

.printing-batch-archive-button:focus-visible {
  outline-color: #cbd5e1;
}

.printing-batch-restore-button {
  color: #1457e1;
}

.printing-batch-restore-button:hover {
  color: #1746b6;
}

.printing-batch-action-spinner {
  display: none;
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  border: 2px solid #cbd5e1;
  border-top-color: currentColor;
  animation: compile-spin 0.8s linear infinite;
}

.inline-action-form.htmx-request .printing-batch-archive-button {
  pointer-events: none;
  opacity: 0.9;
}

.inline-action-form.htmx-request .printing-batch-archive-button .printing-batch-action-icon {
  display: none;
}

.inline-action-form.htmx-request .printing-batch-archive-button .printing-batch-action-spinner {
  display: inline-block;
}

.provider-table-edit-shell {
  display: grid;
  gap: 0.85rem;
  width: 100%;
  grid-column: 1 / -1;
  padding-top: 0.15rem;
}

.provider-row-edit-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.provider-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.provider-form-actions-primary,
.provider-form-actions-secondary {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.agent-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1rem;
}

.agent-form-grid p {
  margin: 0;
}

.agent-form-grid .agent-field-full {
  grid-column: 1 / -1;
}

.agent-form-grid input[type="text"],
.agent-form-grid select,
.agent-form-grid textarea {
  width: 100%;
}

.provider-model-checkbox-list > div,
.provider-model-checkbox-list ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.3rem 1rem;
  margin-top: 0.15rem;
}

.provider-model-checkbox-list > div > div {
  min-width: 0;
}

.provider-model-checkbox-list label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.12rem 0;
  min-height: 100%;
  color: #334e68;
  line-height: 1.2;
}

.provider-model-checkbox-list input[type="checkbox"] {
  margin-top: 0.05rem;
  flex: 0 0 auto;
}

.provider-model-checkbox-list label:hover {
  color: #1746b6;
}

.provider-inline-field {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: nowrap;
}

.provider-inline-field label {
  margin: 0;
  white-space: nowrap;
  flex: 0 0 auto;
}

.provider-inline-field select,
.provider-inline-field input[type="text"] {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 22rem;
}

.course-delete-open {
  display: none;
}

.course-delete-details[open] .course-delete-closed {
  display: none;
}

.course-delete-details[open] .course-delete-open {
  display: inline;
}

/* --- Exam Builder --- */
.builder-hero {
  margin-bottom: 1rem;
}

.builder-workflow-page {
  gap: 0;
  position: relative;
}

@media (min-width: 900px) {
  .builder-hero {
    position: absolute;
    top: 4.1rem;
    right: 0;
    left: 0;
    z-index: 2;
    height: auto;
    margin: 0;
    min-height: 0;
    pointer-events: none;
  }

  .builder-hero-copy {
    transform: translateY(0);
  }

  .builder-hero .builder-title-utility-actions,
  .builder-hero [data-dismissible-status] {
    pointer-events: auto;
  }
}

.builder-hero-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  width: 100%;
  align-items: start;
}

.builder-builder-title {
  min-width: 0;
  display: flex;
  align-items: flex-end;
  gap: 0.65rem;
  width: 100%;
}

.builder-hero-heading {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.builder-title-prefix {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.1;
  color: #486581;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.builder-hero-full {
  grid-column: 1 / -1;
}

.builder-builder-title-compact {
  justify-content: flex-end;
  min-height: 0;
}

.builder-publish-modal {
  width: min(42rem, 100%);
}

.builder-publish-modal-note {
  margin: 0.35rem 0 0;
  color: #486581;
  font-size: 0.92rem;
  line-height: 1.5;
  max-width: 34rem;
}

.builder-hero-panel {
  min-width: 0;
  width: 100%;
  max-width: none;
  margin-bottom: 0;
  align-self: stretch;
}

.builder-controls-toggle-row {
  display: flex;
  justify-content: flex-start;
}

.builder-title-controls {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.builder-title-mainline {
  display: flex;
  flex: 0 1 auto;
  align-items: baseline;
  gap: 0.65rem;
  flex-wrap: wrap;
  min-width: 0;
}

.builder-title-stack {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
  flex: 1 1 auto;
}

.builder-title-topline {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  min-width: 0;
}

.builder-title-course {
  margin: 0;
  white-space: nowrap;
}

.builder-inline-status {
  max-width: 100%;
}

.builder-version-mode-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  min-width: 0;
}

.builder-version-mode-form {
  display: flex;
  align-items: center;
}

.builder-version-mode-form select {
  min-width: 5.5rem;
  width: auto;
}

.builder-title-utility-actions {
  flex: 0 0 auto;
  margin-left: auto;
  min-width: 0;
}

.builder-controls-panel {
  justify-self: start;
  width: fit-content;
  max-width: 100%;
  align-self: flex-start;
  padding: 0.95rem 1rem;
}

.builder-controls-panel:not([hidden]) {
  margin-top: 0.5rem;
}

.builder-controls-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.25rem;
}

.builder-controls-section {
  min-width: 0;
}

.builder-controls-section + .builder-controls-section {
  border-left: 1px solid #e5e7eb;
  padding-left: 1.25rem;
}

.builder-title-course {
  margin: 0;
  font-size: 1rem;
}

.builder-hero-actions {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
  justify-content: space-between;
}

.builder-hero-title-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.builder-title-row {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.builder-title-main {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.builder-title-main h1,
#exam-page-label {
  font-size: 1.9rem;
  line-height: 1.08;
}

.builder-card-heading {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.builder-card-total {
  margin: 0;
  color: #102a43;
  font-weight: 600;
  text-align: right;
}

.builder-card-total strong {
  color: inherit;
}

.builder-draft-panel {
  display: flex;
  flex-direction: column;
}

.builder-draft-card-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

.builder-draft-card-body #publish-workspace {
  margin-top: auto;
  padding-top: 0.5rem;
  margin-bottom: 0.15rem;
}

.builder-draft-card-body .publish-form-inline {
  justify-items: start;
}

.builder-draft-card-body .publish-inline-bar {
  justify-content: flex-start;
}

.hero-utility-actions {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  width: fit-content;
}

.builder-admin-shortcut {
  display: grid;
  gap: 0.2rem;
  justify-items: end;
}

.builder-hero-actions #publish-workspace {
  margin-top: auto;
}

.builder-admin-shortcut-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.builder-admin-shortcut-row select {
  width: auto;
  min-width: 180px;
  padding: 0.35rem 1.9rem 0.35rem 0.6rem;
  font-size: 0.8rem;
  border-radius: 0.45rem;
}

.builder-admin-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  white-space: nowrap;
}

.builder-version-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
}

.builder-version-inline-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  min-width: 0;
  width: 100%;
}

.builder-version-inline-form select {
  min-width: 0;
  max-width: none;
  width: 100%;
}

.builder-workspace {
  --builder-pane-width: var(--builder-pane-width-initial, minmax(540px, 1.4fr));
  display: grid;
  grid-template-columns: var(--builder-pane-width) 14px minmax(300px, 1fr);
  align-items: start;
  gap: 0;
  min-height: 70vh;
}

.builder-column {
  min-width: 0;
  padding-right: 0.75rem;
}

.builder-column .panel {
  max-width: none;
}

.preview-column {
  min-width: 0;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 4.5rem;
}

.builder-workspace.preview-hidden {
  grid-template-columns: minmax(0, 1fr);
}

.builder-workspace.preview-hidden .workspace-divider,
.builder-workspace.preview-hidden .preview-column {
  display: none;
}

.builder-workspace.editor-hidden {
  grid-template-columns: minmax(0, 1fr);
}

.builder-workspace.editor-hidden .workspace-divider,
.builder-workspace.editor-hidden .builder-column {
  display: none;
}

.workspace-divider {
  width: 20px;
  position: relative;
  cursor: col-resize;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}

.workspace-divider::before {
  content: "";
  position: absolute;
  inset: 0 7px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(23, 70, 182, 0.15), rgba(23, 70, 182, 0.04));
}

.workspace-divider-grip {
  position: relative;
  z-index: 1;
  width: 10px;
  height: 80px;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(23, 70, 182, 0.4) 1.5px, transparent 2px) center / 10px 12px repeat-y,
    white;
  border: 1px solid rgba(23, 70, 182, 0.15);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.workspace-divider:hover .workspace-divider-grip,
.builder-workspace.is-resizing .workspace-divider-grip,
.workspace-divider:focus-visible .workspace-divider-grip {
  background:
    radial-gradient(circle, rgba(23, 70, 182, 0.7) 1.5px, transparent 2px) center / 10px 12px repeat-y,
    white;
  border-color: rgba(23, 70, 182, 0.3);
}

.builder-workspace.is-resizing,
.builder-workspace.is-resizing * {
  cursor: col-resize !important;
  user-select: none;
}

.builder-workspace.is-resizing .preview-frame {
  pointer-events: none;
}

/* --- Publish --- */
.builder-hero-status { transform: translateY(-1px); }

.publish-status-cluster { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.publish-version-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  background: #dbeafe;
  color: #1746b6;
  font-weight: 700;
  font-size: 0.8rem;
}

html[data-builder-publish-initial="collapsed"] #builder-finalize-shell [data-publish-body] {
  display: none;
}

html[data-builder-publish-initial="expanded"] #builder-finalize-shell [data-publish-body] {
  display: block;
}

.publish-form-inline {
  display: grid;
  gap: 0.9rem;
  width: fit-content;
  max-width: 100%;
}

.publish-inline-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-bottom: 0.45rem;
}

.publish-label-input-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.publish-ready-gate-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  white-space: nowrap;
  cursor: pointer;
}

.publish-label-field { display: grid; gap: 0.25rem; }

.publish-ack-list {
  display: grid;
  gap: 0.55rem;
  padding-top: 0.25rem;
  border-top: 1px solid #e5e7eb;
  margin-top: 0.15rem;
  padding-bottom: 0.1rem;
}

/* --- Preview view controls --- */
.builder-preview-toolbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
  min-width: 0;
}

.preview-view-controls {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.publish-ack-item {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
}

.publish-inline-label { margin: 0; white-space: nowrap; }
.publish-ack-item input[type="checkbox"] { margin-top: 0.15rem; }

#builder-finalize-shell .publish-form-inline {
  width: 100%;
}

#builder-finalize-shell .publish-inline-bar {
  justify-content: flex-start;
  margin-bottom: 0.8rem;
}

#builder-finalize-shell .message-group + .message-group {
  margin-top: 0.55rem;
}

#builder-finalize-shell .publish-ack-list {
  border-top: 0;
  padding-top: 0;
  margin-top: 0.6rem;
}

/* --- Question Cards --- */
.question-card {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.85rem;
  background: white;
}

.question-card-warning {
  border-color: #f59e0b;
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.15);
}

.question-header,
.compact-question-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.6rem;
}

.question-title,
.compact-question-title { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; min-width: 0; }
.compact-question-title h3 { margin: 0; font-size: 0.98rem; font-weight: 700; }
.question-header-actions { display: inline-flex; align-items: center; gap: 0.45rem; }
.question-actions { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; min-width: 0; flex: 1 1 auto; }
.question-actions-points { display: flex; align-items: center; justify-content: center; flex: 1 1 auto; min-width: 0; }
.question-actions-controls { display: flex; align-items: center; justify-content: flex-end; gap: 0.5rem; flex-wrap: wrap; min-width: 0; }
.question-delete-button { color: #52667a; width: 1.75rem; height: 1.75rem; }
.question-delete-button:hover { background: #f8fafc; color: #334e68; }
.question-delete-button:focus-visible { outline-color: #cbd5e1; }
.inline-action-form { display: inline; margin: 0; }

.drag-handle {
  border: 0;
  background: transparent;
  color: #829ab1;
  cursor: grab;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.warning-badge {
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.75rem;
  font-weight: 700;
}

.compact-question-card {
  display: grid;
  gap: 0.75rem;
  padding: 0.75rem;
}

.question-points-pill {
  font-size: 0.84rem;
  font-weight: 600;
}

.question-collapsed-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  max-width: 100%;
  flex: 1 1 18rem;
}

.question-preview-inline {
  min-width: 0;
  max-width: 34rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #486581;
  font-size: 0.8rem;
}

.question-preview-inline code {
  font-size: inherit;
}

.question-preview-boxes-inline {
  display: inline-flex;
  gap: 0.35rem;
  flex-wrap: nowrap;
}

.compact-question-body {
  display: grid;
  gap: 0.75rem;
}

.question-preview-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #d9e2ec;
  color: #486581;
  font-size: 0.76rem;
  font-weight: 600;
}

.question-inline-form {
  margin: 0;
}

.question-inline-form textarea,
.question-inline-form input[type="text"],
.question-inline-form input[type="number"] {
  width: 100%;
}

.question-prompt-form textarea {
  min-height: 7.25rem;
  padding: 0.55rem 0.65rem;
  line-height: 1.45;
}

.question-header-points-form,
.question-points-form {
  display: inline-grid;
  gap: 0.25rem;
}

.question-header-points-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.question-header-points-form input[type="number"] {
  width: 4.5rem;
  min-width: 4.5rem;
  padding: 0.28rem 0.42rem;
  border-radius: 0.45rem;
}

.question-header-points-form .form-errors {
  padding: 0.35rem 0.45rem;
  font-size: 0.8rem;
}

.question-points-form label,
.question-workspace-heading span:first-child,
.question-workspace-label,
.question-create-fields label {
  font-weight: 600;
}

.question-workspace-stack {
  display: grid;
  gap: 0.45rem;
}

.question-workspace-inline-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.question-workspace-inline-label {
  font-size: 0.86rem;
  font-weight: 600;
  color: #243b53;
}

.question-workspace-inline-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.question-workspace-form input[type="text"],
.question-add-box-form input[type="text"] {
  width: 4.5rem;
  min-width: 4.5rem;
  padding: 0.38rem 0.55rem;
}

.question-workspace-delete,
.question-workspace-delete-spacer {
  width: 1.65rem;
  height: 1.65rem;
}

.question-workspace-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  color: #52667a;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.question-workspace-delete:hover {
  background: #e2e8f0;
  color: #334e68;
}

.question-workspace-delete svg {
  width: 0.85rem;
  height: 0.85rem;
}

.question-add-box-wrap {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  padding-top: 0.15rem;
}

.compact-add-row-toggle {
  font-weight: 600;
}

.question-add-box-form {
  display: inline-grid;
  gap: 0.25rem;
  margin: 0;
}

.question-add-box-form input[type="text"] {
  width: 4.5rem;
}

.question-workspace-help {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
}

.workspace-list { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.workspace-chip {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid #d9e2ec;
  border-radius: 0.45rem;
  background: #f8fafc;
  color: #243b53;
  overflow: hidden;
}

.workspace-chip-text {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.55rem;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.workspace-chip-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.8rem;
  border: 0;
  border-left: 1px solid #d9e2ec;
  background: #f1f5f9;
  color: #52667a;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0 0.35rem;
}

.workspace-chip-delete:hover {
  background: #e2e8f0;
  color: #334e68;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 999px;
  background: #eef7ff;
  color: #1746b6;
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.subform {
  border: 1px dashed #d1d5db;
  border-radius: 0.5rem;
  padding: 0.85rem;
}

.compact-inline-form { margin-top: 0.65rem; }

.compact-inline-row {
  display: grid;
  grid-template-columns: auto minmax(120px, 180px) auto;
  gap: 0.45rem;
  align-items: center;
}

.compact-inline-form label { font-weight: 600; }
.compact-inline-form small { display: block; color: #627d98; margin-top: 0.25rem; }

.workspace-edit-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.75rem;
  align-items: start;
}

.workspace-edit-label { font-weight: 600; padding-top: 0.65rem; }
.workspace-edit-input small { display: block; color: #627d98; margin-top: 0.25rem; }

.compact-question-list {
  gap: 0.65rem;
}

.question-create-shell {
  margin-top: 0.8rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e5e7eb;
}

.question-create-toggle {
  font-weight: 600;
}

.compact-question-create-form {
  gap: 0.7rem;
}

.question-create-fields {
  display: grid;
  gap: 0.75rem;
}

.question-create-main,
.question-create-inline-fields,
.question-create-inline-field {
  min-width: 0;
}

.question-create-main textarea {
  min-height: 7rem;
  padding: 0.55rem 0.65rem;
}

.question-create-inline-fields {
  display: flex;
  gap: 0.7rem;
  align-items: start;
  flex-wrap: wrap;
}

.question-create-inline-field {
  display: grid;
  gap: 0.35rem;
  width: min(220px, 100%);
}

.question-create-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.muted-button {
  color: #627d98;
  border-color: #d9e2ec;
  background: #f8fafc;
}

.muted-button:disabled {
  opacity: 1;
  cursor: not-allowed;
}

.exam-total {
  margin-top: 0.1rem;
  margin-bottom: 0;
  color: #1746b6;
  font-weight: 700;
  font-size: 0.9rem;
}

.exam-total.builder-card-total,
.exam-total.builder-card-total strong {
  color: #102a43;
}

.exam-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  margin-bottom: 1.25rem;
}

/* --- Asset panel --- */
.asset-dropzone {
  border: 1px dashed #93c5fd;
  border-radius: 0.5rem;
  padding: 1rem;
  background: #f0f7ff;
  display: grid;
  gap: 0.65rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.asset-dropzone[data-drag-active="true"] {
  border-color: #338dff;
  background: #dbeafe;
}

.asset-dropzone input[type="file"] { border-style: dashed; }
.asset-panel-note { margin-top: 0.35rem; }

.asset-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.2rem;
}

.asset-table td {
  padding: 0.4rem 0.55rem 0.55rem;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid #e5e7eb;
}

.asset-table tbody tr:last-child td {
  border-bottom: 0;
}

.asset-row-name {
  width: 100%;
}

.asset-row-name-inner {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
}

.asset-row-bullet {
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex: 0 0 auto;
}

.asset-row-link,
.asset-row-delete {
  white-space: nowrap;
  width: 1%;
}

.asset-rename-form {
  display: grid;
  gap: 0.35rem;
  flex: 1 1 auto;
  min-width: 0;
}

.asset-rename-form input[type="text"] {
  width: 100%;
  min-width: 0;
  padding: 0.35rem 0.55rem;
}

.asset-row-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #52667a;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}

.asset-row-icon-button:hover {
  background: #f8fafc;
  color: #334e68;
}

.asset-row-icon-button:focus-visible {
  outline: 2px solid #cbd5e1;
  outline-offset: 2px;
}

.asset-row-icon-button svg {
  width: 1rem;
  height: 1rem;
}

.asset-row-delete .provider-delete-button {
  color: #52667a;
}

.asset-row-delete .provider-delete-button:hover {
  background: #f8fafc;
  color: #334e68;
}

.asset-row-delete .provider-delete-button:focus-visible {
  outline-color: #cbd5e1;
}

/* --- Form errors --- */
.form-errors,
.errorlist {
  margin: 0;
  padding: 0.55rem 0.75rem;
  list-style: none;
  border-radius: 0.375rem;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.85rem;
}

.errorlist { margin-top: 0.35rem; }

/* --- Preview panel --- */
.preview-panel { width: 100%; }
.preview-header { align-items: flex-start; flex-wrap: wrap; }
.preview-title-row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; flex: 1 1 auto; min-width: 0; }
.preview-actions { display: flex; gap: 0.5rem; flex-wrap: nowrap; justify-content: flex-end; align-items: flex-start; flex: 0 0 auto; }
.preview-status-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.preview-status-row-inline { margin-bottom: 0; }

@media (max-width: 900px) {
  .preview-actions { flex-wrap: wrap; }
}

.compile-progress-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.75rem;
  border: 1px solid #dbeafe;
  border-radius: 0.5rem;
  background: #f0f7ff;
}

.compile-progress-banner p { margin: 0.15rem 0 0; }

.compile-status-chip-wrap { display: inline-flex; }

.compile-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.4rem 0.7rem;
  border: 1px solid #e5e7eb;
  background: white;
  font-weight: 700;
  font-size: 0.8rem;
}

.compile-status-chip.is-running { border-color: #93c5fd; background: #eff6ff; color: #1746b6; }
.compile-status-chip.is-stale { border-color: #fcd34d; background: #fffbeb; color: #92400e; }
.compile-status-chip.is-current { border-color: #a7f3d0; background: #ecfdf5; color: #065f46; }

.spinner-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  background: #1746b6;
  box-shadow: 1rem 0 0 rgba(23, 70, 182, 0.3), -1rem 0 0 rgba(23, 70, 182, 0.15);
  animation: pulse-dot 1.2s infinite ease-in-out;
  flex: 0 0 auto;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(0.85); opacity: 0.8; }
  50% { transform: scale(1.1); opacity: 1; }
}

.preview-canvas-shell {
  min-height: 720px;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background: #f9fafb;
  padding: 0.75rem;
  overflow: auto;
}

.preview-frame {
  display: block;
  width: 100%;
  min-height: 900px;
  border: 0;
  background: white;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.preview-render-note { margin-top: 0.5rem; text-align: center; }
.preview-page-panel {
  max-width: none;
  width: 100%;
  margin-bottom: 0;
}
.empty-state { display: grid; place-items: center; min-height: 280px; text-align: center; }
.version-summary-grid { margin-bottom: 1.25rem; }

/* --- Compile / Submit Buttons --- */
.compile-button { position: relative; gap: 0.4rem; }
.compile-button.is-stale { background: #d97706; border-color: #d97706; color: white; }
.compile-button.is-stale:hover { background: #b45309; }

.button-spinner {
  display: none;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: white;
  animation: compile-spin 0.8s linear infinite;
  flex: 0 0 auto;
}

.button-label-loading { display: none; }

.panel.wide.batch-create-panel-anonymous {
  max-width: 52rem;
}

.batch-anonymous-panel {
  display: grid;
  gap: 0.5rem;
}

.batch-create-panel-anonymous .batch-create-form {
  width: 100%;
}

.batch-mode-help {
  margin: -0.15rem 0 0;
  max-width: 52rem;
  color: #334e68;
  font-size: 0.95rem;
  line-height: 1.45;
}

.batch-anonymous-count-row {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.batch-anonymous-count-row label {
  margin: 0;
  white-space: nowrap;
}

.batch-anonymous-count-row input {
  width: 8rem;
  max-width: 100%;
}

.batch-anonymous-limit-help {
  margin: 0.35rem 0 0;
  font-size: 0.84rem;
}

.batch-submit-row {
  display: grid;
  gap: 0.35rem;
}

.batch-submit-main-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: nowrap;
}

.batch-label-field {
  display: grid;
  gap: 0.25rem;
  flex: 0 1 auto;
  min-width: 0;
  max-width: none;
}

.batch-label-help {
  margin-left: 0;
}

.batch-label-input-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: nowrap;
}

.batch-label-input-row label {
  margin: 0;
  white-space: nowrap;
}

.batch-label-input-row input,
.batch-label-input-row select,
.batch-label-input-row textarea {
  flex: 0 1 22rem;
  width: 22rem;
  min-width: 0;
  max-width: 22rem;
}

.batch-label-field input,
.batch-label-field select,
.batch-label-field textarea {
  max-width: 100%;
}

.batch-submit-button {
  gap: 0.4rem;
  margin-top: 0;
  align-self: center;
}
.batch-submit-button.is-submitting { opacity: 0.96; pointer-events: none; }
.batch-submit-button.is-submitting .button-spinner { display: inline-block; }
.batch-submit-button.is-submitting .button-label { display: none; }
.batch-submit-button.is-submitting .button-label-loading { display: inline; }

.batch-create-form.htmx-request .batch-submit-button { opacity: 0.96; pointer-events: none; }
.batch-create-form.htmx-request .batch-submit-button .button-spinner { display: inline-block; }
.batch-create-form.htmx-request .batch-submit-button .button-label { display: none; }
.batch-create-form.htmx-request .batch-submit-button .button-label-loading { display: inline; }

.batch-submit-progress { display: none; gap: 0.4rem; margin-top: 0.15rem; }
.batch-create-form.htmx-request .batch-submit-progress { display: grid; }
.batch-submit-progress-label { margin: 0; color: #1746b6; font-weight: 600; }

.batch-submit-progress-bar {
  position: relative;
  display: block;
  width: min(24rem, 100%);
  height: 0.5rem;
  overflow: hidden;
  border-radius: 999px;
  background: #dbeafe;
  border: 1px solid #bfdbfe;
}

.batch-submit-progress-bar-fill {
  position: absolute;
  inset: 0;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1746b6, #338dff);
  animation: batch-submit-progress-slide 1.1s ease-in-out infinite;
}

@keyframes batch-submit-progress-slide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(260%); }
}

.compile-form.htmx-request .compile-button,
.compile-button.htmx-request { opacity: 0.96; pointer-events: none; }

.compile-form.htmx-request .button-spinner,
.compile-button.htmx-request .button-spinner { display: inline-block; }

form.htmx-request .button[type="submit"]:not(.compile-button),
.button[type="submit"].htmx-request:not(.compile-button) {
  opacity: 0.96;
  pointer-events: none;
  padding-right: 2.2rem;
}

form.htmx-request .button[type="submit"]:not(.compile-button)::after,
.button[type="submit"].htmx-request:not(.compile-button)::after {
  content: "";
  position: absolute;
  right: 0.75rem;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 999px;
  border: 2px solid rgba(0,0,0,0.15);
  border-top-color: currentColor;
  animation: compile-spin 0.8s linear infinite;
}

.rubric-editor-grid.htmx-request .button[type="submit"] {
  opacity: 1;
  pointer-events: auto;
  padding-right: 1rem;
}

.rubric-editor-grid.htmx-request .button[type="submit"]::after {
  content: none;
}

.rubric-editor-grid {
  display: grid;
  gap: 0.85rem;
}

.rubric-draft-field {
  display: grid;
  gap: 0.35rem;
}

.rubric-editor-actions-inline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: nowrap;
}

.rubric-publish-inline-row {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 1 1 auto;
  min-width: 0;
}

.rubric-publish-inline-row label {
  margin: 0;
  white-space: nowrap;
}

.rubric-publish-inline-row input[type="text"],
.rubric-publish-inline-row input:not([type]) {
  flex: 1 1 14rem;
  min-width: 0;
}

@media (max-width: 700px) {
  .rubric-editor-actions-inline {
    flex-wrap: wrap;
    align-items: stretch;
  }

  .rubric-publish-inline-row {
    width: 100%;
  }
}

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

/* --- Batch rows --- */
.batch-inline-notice {
  display: grid;
  gap: 0.25rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.5rem;
  border: 1px solid #a7f3d0;
  background: #ecfdf5;
  color: #065f46;
  font-size: 0.875rem;
}

.batch-inline-notice strong { font-size: 0.9rem; }
.batch-inline-notice-success { border-color: #a7f3d0; }
.batch-inline-notice-error { border-color: #fca5a5; background: #fef2f2; color: #991b1b; }

.batch-row-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 0.5rem; }
.batch-progress-note { margin: 0 0 0.75rem; color: #1746b6; font-weight: 600; }
.batch-status-detail { max-width: 28rem; }

.batch-progress {
  position: relative;
  display: inline-flex;
  width: 10rem;
  height: 0.5rem;
  overflow: hidden;
  border-radius: 999px;
  background: #dbeafe;
  border: 1px solid #bfdbfe;
}

.batch-progress-bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1746b6, #338dff);
  transition: width 0.25s ease;
}

.batch-progress-meta { min-width: 5rem; font-variant-numeric: tabular-nums; }

/* --- Printing readiness --- */
.panel.wide.printing-status-panel {
  display: grid;
  gap: 1rem;
  max-width: 52rem;
}

.printing-readiness-panel {
  display: grid;
  gap: 0.9rem;
}

.printing-readiness-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.printing-readiness-title {
  margin: 0;
  color: #102a43;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.printing-readiness-heading {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1 1 auto;
  min-width: 0;
}

.printing-readiness-help {
  transform: none;
}

.printing-readiness-help:hover,
.printing-readiness-help:focus-visible {
  transform: none;
}

.printing-readiness-detail-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
}

.printing-readiness-chip-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.printing-readiness-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1746b6;
  padding: 0.25rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.printing-readiness-chip-active {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.printing-readiness-main {
  display: flex;
  align-items: baseline;
  gap: 0.65rem 1rem;
  flex-wrap: wrap;
  min-width: min(100%, 20rem);
}

.printing-readiness-main-empty {
  align-items: center;
}

.printing-readiness-primary {
  margin: 0;
  color: #102a43;
  font-size: 1rem;
  line-height: 1.45;
}

.printing-readiness-primary strong {
  font-weight: 800;
}

.printing-readiness-extra {
  color: #166534;
  font-size: 0.86rem;
  font-weight: 700;
}

.printing-readiness-bar {
  position: relative;
  display: block;
  flex: 1 1 18rem;
  min-width: 12rem;
  height: 0.75rem;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #f1f5f9;
}

.printing-readiness-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: width 0.25s ease;
}

.printing-readiness-bar-ready {
  border-color: #86efac;
  background: #dcfce7;
}

.printing-readiness-bar-ready .printing-readiness-bar-fill {
  background: #16a34a;
}

.printing-readiness-bar-short {
  border-color: #fde68a;
  background: #fef3c7;
}

.printing-readiness-bar-short .printing-readiness-bar-fill {
  background: #f59e0b;
}

.printing-readiness-note,
.printing-readiness-needed {
  margin: 0;
  color: #52606d;
  font-size: 0.9rem;
  line-height: 1.5;
}

.printing-readiness-needed {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 0.55rem;
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #92400e;
  padding: 0.45rem 0.65rem;
  font-weight: 700;
}

.printing-readiness-tip-card,
.printing-readiness-warning-card {
  border-radius: 0.65rem;
  padding: 0.75rem 0.85rem;
}

.printing-readiness-tip-card[hidden],
.printing-readiness-warning-card[hidden] {
  display: none;
}

.printing-readiness-tip-card {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #14532d;
}

.printing-readiness-warning-card {
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #854d0e;
}

.printing-readiness-tip-card h3,
.printing-readiness-warning-card h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
}

.printing-readiness-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.printing-readiness-card-dismiss {
  display: inline-block;
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  padding: 0 0.05rem;
  opacity: 0.72;
  cursor: pointer;
}

.printing-readiness-card-dismiss:hover,
.printing-readiness-card-dismiss:focus-visible {
  opacity: 1;
  outline: none;
}

.printing-readiness-tip-card p,
.printing-readiness-warning-card p {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.printing-batch-row-restored {
  animation: printing-restored-batch-pulse 1.8s ease-out;
}

@keyframes printing-restored-batch-pulse {
  0% {
    box-shadow: inset 0 0 0 999px rgba(220, 252, 231, 0.95);
  }
  100% {
    box-shadow: inset 0 0 0 999px rgba(220, 252, 231, 0);
  }
}

.printing-batches-panel {
  display: grid;
  gap: 0.75rem;
}

/* --- Status pills --- */
.status-pill {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  max-width: 100%;
  white-space: normal;
}

.status-pill[hidden] {
  display: none !important;
}

.status-pill[data-dismissible-status] { display: inline-flex; }
.status-pill-dismiss { border: 0; background: transparent; color: inherit; font: inherit; line-height: 1; padding: 0; cursor: pointer; opacity: 0.8; margin-left: auto; }
.status-pill-dismiss:hover { opacity: 1; }

.preview-title-row .status-pill.preview-readonly-pill {
  font-size: 1.02rem;
  padding: 0.5rem 0.82rem;
}

.flash-message-stack {
  display: grid;
  gap: 0.75rem;
  justify-items: center;
}

.flash-message-card {
  width: min(100%, 46rem);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  border: 1px solid transparent;
  box-shadow: 0 12px 28px rgba(16, 42, 67, 0.07);
  font-size: 0.95rem;
  line-height: 1.55;
  font-weight: 600;
}

.flash-message-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.flash-message-success {
  background: #ecfdf3;
  border-color: #b7ebc6;
  color: #166534;
}

.flash-message-error {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #be123c;
}

.flash-message-warning {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}

.flash-message-info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}
.status-queued, .status-running { background: #dbeafe; color: #1746b6; }
.status-succeeded, .status-current { background: #d1fae5; color: #065f46; }
.status-failed, .status-stale { background: #fef3c7; color: #92400e; }
.status-warning { background: #fef9c3; color: #854d0e; border: 1px solid #fde68a; }

/* --- Compile messages --- */
.compile-messages { display: grid; gap: 0.5rem; margin-bottom: 0.75rem; }

.message-group {
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 0.8rem 0.95rem;
  background: white;
  font-size: 0.9rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}

.message-group h3 {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  line-height: 1.3;
}

.message-group-error, .message-group-errors {
  border-color: #fca5a5;
  background: linear-gradient(180deg, #fff5f5, #fef2f2);
}

.message-group-warning, .message-group-warnings {
  border-color: #fcd34d;
  background: linear-gradient(180deg, #fffdf5, #fffbeb);
}

.message-list {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.3rem;
}

/* --- Scan matrix --- */
:root {
  --scan-status-accepted: #16a34a;
  --scan-status-roster: #2563eb;
  --scan-status-review: #eab308;
  --scan-status-rejected: #1d4ed8;
  --scan-status-missing: #9ca3af;
}

.scan-summary-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.25rem;
  align-items: center;
  color: #627d98;
  font-size: 0.875rem;
}

.scan-summary-stats strong { color: #102a43; font-size: 1rem; }
.scan-summary-count { font-size: 1rem; }
.scan-summary-count-accepted { color: var(--scan-status-accepted) !important; }
.scan-summary-count-review { color: var(--scan-status-review) !important; }
.scan-summary-count-missing { color: var(--scan-status-missing) !important; }
.scan-summary-count-roster { color: var(--scan-status-roster) !important; }
.scan-status-row {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-top: 0.9rem;
  flex-wrap: wrap;
}
.scan-status-label {
  color: #102a43;
  font-size: 0.95rem;
  line-height: 1.4;
  white-space: nowrap;
}
.scan-status-header {
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.25rem;
}
.scan-status-heading {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1 1 auto;
  min-width: 0;
}
.scan-status-title {
  margin: 0;
  color: #102a43;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}
.scan-status-help {
  transform: none;
}
.scan-status-help:hover,
.scan-status-help:focus-visible {
  transform: none;
}
.scan-coverage-bar-shell {
  flex: 1 1 18rem;
  min-width: 12rem;
}
.scan-coverage-bar {
  display: flex;
  width: 100%;
  height: 0.75rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}
.scan-coverage-bar-segment {
  display: block;
  height: 100%;
  min-width: 0.35rem;
}
.scan-coverage-bar-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin-top: 0.45rem;
  font-size: 0.8rem;
  line-height: 1.45;
}
.scan-coverage-bar-label {
  font-weight: 700;
}
.scan-upload-history-block {
  margin-top: 0.5rem;
}
.scan-status-toggle-link {
  font-size: 0.92rem;
  font-weight: 700;
}
.scan-upload-status-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
}
.scan-summary-matrix { margin-top: 1.25rem; }
.scan-matrix-legend { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.75rem; color: #627d98; font-size: 0.85rem; }

.scan-matrix-shell {
  overflow-x: auto;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
}

.scan-matrix {
  display: inline-table;
  width: max-content;
  min-width: max-content;
  max-width: none;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.85rem;
  table-layout: auto;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  overflow: hidden;
}

.scan-matrix th,
.scan-matrix td {
  padding: 0.24rem 0.3rem;
  border-bottom: 1px solid #f3f4f6;
  border-right: 1px solid #f3f4f6;
  text-align: center;
  white-space: nowrap;
}

.scan-matrix thead th { position: sticky; top: 0; background: #fafafa; z-index: 1; }
.scan-matrix th:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  background: #fafafa;
  z-index: 2;
  min-width: 10rem;
  padding-right: 0.55rem;
}
.scan-matrix thead th:not(:first-child) {
  min-width: 2.1rem;
}
.scan-matrix td:last-child, .scan-matrix th:last-child { border-right: 0; }
.scan-matrix tbody tr:last-child td, .scan-matrix tbody tr:last-child th { border-bottom: 0; }
.scan-matrix tbody tr.scan-matrix-row-conflict th,
.scan-matrix tbody tr.scan-matrix-row-conflict td {
  background: #fffbeb;
}
.scan-matrix tbody tr.scan-matrix-row-noncanonical th,
.scan-matrix tbody tr.scan-matrix-row-noncanonical td {
  color: #7b8794;
  background: #fafbfc;
}
.scan-matrix tbody tr.scan-matrix-row-noncanonical .scan-matrix-link,
.scan-matrix tbody tr.scan-matrix-row-noncanonical .scan-matrix-cell span,
.scan-matrix tbody tr.scan-matrix-row-noncanonical .status-pill,
.scan-matrix tbody tr.scan-matrix-row-noncanonical .warning-badge {
  opacity: 0.62;
}
.scan-matrix-cell { font-weight: 700; font-size: 0.9rem; }
.scan-matrix-link { display: inline-block; min-width: 1rem; text-decoration: underline; }
.scan-matrix-cell span,
.scan-matrix-link {
  display: inline;
  width: auto;
  height: auto;
  min-width: 0;
  background: transparent;
  border-radius: 0;
}
.scan-matrix-row-status {
  margin-left: 0.35rem;
}
.scan-matrix-row-status-link {
  text-decoration: none;
}
.scan-review-image-link {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
}
.scan-review-image { display: block; max-width: 100%; border: 1px solid #e5e7eb; border-radius: 0.5rem; background: white; }
.scan-matrix-cell-accepted span,
.scan-matrix-cell-accepted .scan-matrix-link { color: var(--scan-status-accepted); }
.scan-matrix-cell-needs_review span,
.scan-matrix-cell-needs_review .scan-matrix-link { color: var(--scan-status-review); }
.scan-matrix-cell-needs_roster_match span,
.scan-matrix-cell-needs_roster_match .scan-matrix-link { color: var(--scan-status-roster); }
.scan-matrix-cell-rejected span,
.scan-matrix-cell-rejected .scan-matrix-link { color: var(--scan-status-rejected); }
.scan-matrix-cell-missing span,
.scan-matrix-cell-missing .scan-matrix-link {
  color: var(--scan-status-missing);
}

/* --- Exam Workflow Nav --- */
.exam-workflow-body {
  background: #f9fafb;
}

.exam-workflow-page {
  display: grid;
  gap: 1rem;
}

.exam-workflow-page .exam-workflow-shell {
  margin-bottom: 0;
}

.exam-workflow-shell {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1.15rem;
  padding: 0.2rem 0 0.2rem;
  width: 100%;
}

.exam-workflow-header {
  display: grid;
  gap: 0.55rem;
}

.exam-workflow-copy {
  min-width: 0;
  display: grid;
  gap: 0.5rem;
  width: 100%;
}

.exam-workflow-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
  min-width: 0;
  width: 100%;
}

.exam-workflow-title-group {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  flex-wrap: wrap;
  min-width: 0;
  flex: 1 1 auto;
}

.exam-workflow-title-block {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
}

.exam-workflow-heading-line {
  display: inline-flex;
  align-items: baseline;
  gap: 0.7rem;
  flex-wrap: wrap;
  min-width: 0;
}

.exam-workflow-title {
  margin: 0;
  color: #102a43;
  font-size: clamp(1.55rem, 2.4vw, 2rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.exam-workflow-lede { margin: 0; max-width: 48rem; }

.exam-workflow-controls-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.exam-workflow-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
  align-items: center;
}

.exam-workflow-header-tools {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  min-width: 0;
}

.exam-workflow-version-picker {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.exam-workflow-scope-label {
  color: #52606d;
  font-size: 0.82rem;
  font-weight: 700;
}

.exam-workflow-version-form {
  display: flex;
  align-items: center;
}

.exam-workflow-version-form select {
  min-width: 15rem;
  width: auto;
  min-height: 2.55rem;
}

.exam-workflow-top-action-form {
  display: flex;
  align-items: center;
}

.exam-workflow-top-action {
  min-height: 2.55rem;
  padding: 0.6rem 0.95rem;
  white-space: nowrap;
}

.exam-workflow-preview-link {
  color: #486581;
}

.exam-workflow-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0;
  padding-top: 0.4rem;
}

.exam-workflow-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.55rem;
  padding: 0.62rem 1.05rem;
  border: 1px solid #d9e2ec;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #486581;
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

a.exam-workflow-tab:hover,
a.exam-workflow-tab:focus-visible {
  color: #1746b6;
  border-color: #bfd3ea;
  background: #f8fbff;
  box-shadow: 0 0 0 3px rgba(23, 70, 182, 0.08);
  outline: none;
}

.exam-workflow-tab-label {
  display: block;
  font-size: inherit;
  line-height: 1.1;
  font-weight: inherit;
  letter-spacing: 0;
  color: inherit;
  max-width: 100%;
}

.exam-workflow-tab-shell.exam-workflow-step-current .exam-workflow-tab {
  color: #1746b6;
  border-color: #60a5fa;
  background: linear-gradient(180deg, #dbeafe 0%, #eff6ff 100%);
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.45), 0 6px 14px rgba(23, 70, 182, 0.1);
}

.exam-workflow-tab-shell.exam-workflow-step-blocked .exam-workflow-tab {
  opacity: 0.6;
}

.exam-workflow-tab-shell.exam-workflow-step-blocked .exam-workflow-tab-label {
  color: #7b8794;
}

.exam-workflow-content-shell {
  display: grid;
  gap: 1rem;
  padding: 1.2rem;
  border: 1px solid rgba(191, 219, 254, 0.7);
  border-radius: 1.35rem;
  background: rgba(255, 255, 255, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 18px 36px rgba(148, 163, 184, 0.12);
  backdrop-filter: blur(6px);
}

.exam-workflow-content-stack {
  display: grid;
  gap: 1rem;
}

/* legacy overrides cleared for simpler course-workspace-like exam nav */
.exam-workflow-tab-shell {
  position: relative;
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
}

/* reset earlier minimalist underline treatment */
.exam-workflow-tab::after {
  content: none !important;
}

/* keep nav compact on mobile like course workspace */
@media (max-width: 960px) {
  .exam-workflow-shell {
    padding: 0.15rem 0 0.15rem;
  }
  .exam-workflow-heading-line {
    gap: 0.55rem;
  }
  .exam-workflow-title {
    font-size: clamp(1.55rem, 7vw, 2rem);
  }
  .exam-workflow-title-group {
    gap: 0.6rem;
  }
  .exam-workflow-header-tools,
  .exam-workflow-version-picker {
    width: 100%;
  }
  .exam-workflow-nav {
    gap: 0.45rem;
  }
}
.exam-workflow-banner {
  margin-top: 0.95rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid #d9e2ec;
  border-radius: 0.85rem;
  background: #f8fbff;
  color: #334e68;
  font-size: 0.88rem;
  line-height: 1.5;
}

.exam-workflow-banner-info {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
}

.exam-workflow-warnings { display: grid; gap: 0.4rem; margin: 0 0 0.95rem; }

.exam-workflow-warning {
  display: block;
  margin: 0;
  padding: 0.5rem 0.65rem;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  background: #fafafa;
  font-size: 0.85rem;
}

.exam-workflow-warning .exam-workflow-badge {
  display: inline-flex;
  margin-bottom: 0.45rem;
}
.exam-workflow-warning-info { border-color: #93c5fd; background: #eff6ff; }
.exam-workflow-warning-info .exam-workflow-badge { background: #dbeafe; color: #1e40af; }
.exam-workflow-warning-warning { border-color: #fcd34d; background: #fffbeb; }
.exam-workflow-warning-warning .exam-workflow-badge { background: #fef3c7; color: #92400e; }
.exam-workflow-warning-danger { border-color: #fca5a5; background: #fef2f2; }
.exam-workflow-warning-danger .exam-workflow-badge { background: #991b1b; color: white; }
.exam-workflow-warning .exam-workflow-badge.exam-workflow-badge-info { background: #dbeafe; color: #1e40af; }
.exam-workflow-warning .exam-workflow-badge.exam-workflow-badge-warning { background: #fef3c7; color: #92400e; }
.exam-workflow-warning .exam-workflow-badge.exam-workflow-badge-danger { background: #991b1b; color: white; }
.exam-workflow-warning-ack { margin-top: 0.75rem; }
.exam-workflow-warning-ack-label {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}
.exam-workflow-warning-ack-actions { margin-top: 0.75rem; }

.exam-workflow-state, .exam-workflow-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.exam-workflow-state { background: #e2e8f0; color: #334155; }
.exam-workflow-badge { background: #fef3c7; color: #92400e; }

.exam-workflow-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(15, 23, 42, 0.44);
  backdrop-filter: blur(3px);
}

.exam-workflow-modal {
  width: min(46rem, 100%);
  max-height: calc(100vh - 2.5rem);
  overflow: auto;
  border-radius: 1.2rem;
  border: 1px solid #d9e2ec;
  background: #fff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
}

.exam-workflow-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.25rem 0.75rem;
}

.exam-workflow-modal-prefix {
  margin: 0 0 0.25rem;
  color: #486581;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.exam-workflow-modal-title {
  margin: 0;
  color: #102a43;
  font-size: 1.55rem;
  line-height: 1.1;
}

.exam-workflow-modal-close {
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid #d9e2ec;
  border-radius: 999px;
  background: #fff;
  color: #486581;
  font-size: 1.3rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.exam-workflow-modal-body {
  padding: 0 1.25rem 1.25rem;
}

.exam-workflow-help-copy {
  margin: 0.8rem 0 0;
  color: #243b53;
  font-size: 1rem;
  line-height: 1.65;
}

.exam-workflow-help-copy strong {
  color: #1f5131;
}

.exam-workflow-modal-scan-help .exam-workflow-help-copy,
.exam-workflow-modal-scan-help .exam-workflow-help-copy strong,
.exam-workflow-modal-scan-help .exam-workflow-help-list li,
.exam-workflow-modal-scan-help .exam-workflow-help-list strong {
  color: #000;
}

.exam-workflow-help-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.exam-workflow-help-card,
.exam-workflow-help-example-card {
  border: 1px solid #d9e2ec;
  border-radius: 1rem;
  background: #f8fbff;
  padding: 1rem;
}

.exam-workflow-help-card-eyebrow {
  margin: 0 0 0.35rem;
  color: #1f5131;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.exam-workflow-help-card h3,
.exam-workflow-help-example-card h3 {
  margin: 0;
  color: #102a43;
  font-size: 1rem;
}

.exam-workflow-help-card p {
  margin: 0.45rem 0 0;
  color: #334e68;
  line-height: 1.55;
  font-size: 0.94rem;
}

.exam-workflow-help-list {
  margin-top: 1rem;
  padding-left: 1.35rem;
  list-style: disc;
}

.exam-workflow-help-list-card {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem 0.85rem 2.1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #f8fafc;
}

.exam-workflow-help-list li {
  margin: 0.4rem 0;
  color: #102a43;
  font-size: 0.94rem;
  line-height: 1.5;
}

.exam-workflow-help-list strong {
  color: #102a43;
}

.exam-workflow-inline-agent-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  margin: 0 0.15rem;
  vertical-align: -0.35rem;
  color: #486581;
}

.exam-workflow-inline-agent-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.exam-workflow-help-example-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.exam-workflow-help-example-card pre {
  margin: 0.55rem 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #243b53;
  font-size: 0.88rem;
  line-height: 1.55;
  font-family: inherit;
}

/* --- Agent summary --- */
.agent-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  color: #627d98;
  font-size: 0.85rem;
}

.agent-summary strong { color: #102a43; }

/* --- Inline form --- */
.inline-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
}

.inline-form select { width: auto; min-width: 10rem; }

.rubric-pane-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  width: 100%;
}

.rubric-pane-controls-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  min-width: 0;
}

.rubric-select {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.rubric-card-top-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  width: 100%;
}

.rubric-card-summary {
  display: grid;
  gap: 0.05rem;
  flex: 0 1 14rem;
  min-width: 10rem;
  font-size: 0.72rem;
  line-height: 1.2;
  color: #627d98;
}

.rubric-card-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  margin-top: 0.75rem;
}

.rubric-card > .question-header {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
}

.rubric-card > .question-header .question-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: auto;
  justify-content: flex-start;
  min-width: 0;
}

.rubric-card > .question-header .question-title {
  align-self: start;
}

.rubric-card > .question-header .rubric-pane-controls {
  justify-content: flex-start;
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}

.rubric-card > .question-header .rubric-pane-controls-left {
  flex: 1 1 auto;
  min-width: 0;
}

.rubric-card > .question-header .rubric-autosave-status {
  margin-left: auto;
}

.rubric-pane {
  min-width: 0;
}

.scan-upload-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.55fr) minmax(0, 1.45fr);
  gap: 1rem;
  align-items: start;
}

.scan-upload-form {
  display: grid;
  gap: 1rem;
}

.scan-upload-form-fields {
  display: grid;
  gap: 0.45rem;
}

.scan-upload-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 0.9rem;
}

.scan-upload-actions {
  margin-left: 0;
  justify-content: flex-start;
}

.scan-history-table-wrap {
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: #fafafa;
}

.printing-batches-table-wrap {
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: #fafafa;
}

.printing-batches-table {
  min-width: 0;
  background: white;
}

.printing-batches-table th:last-child,
.printing-batches-table td:last-child {
  text-align: right;
}

.printing-batch-primary-cell,
.printing-batch-mode-cell,
.printing-batch-packet-cell,
.printing-batch-status-cell,
.printing-batch-created-cell {
  display: grid;
  gap: 0.35rem;
}

.printing-batch-name-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.printing-batch-mode-cell strong,
.printing-batch-packet-cell strong,
.printing-batch-status-cell strong,
.printing-batch-created-cell strong {
  color: #102a43;
}

.printing-batch-created-cell {
  white-space: nowrap;
}

.printing-batch-status-pill-failed {
  justify-self: start;
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.printing-batches-table th:nth-child(5),
.printing-batches-table td:nth-child(5) {
  width: 1%;
}

.printing-batch-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-width: 0;
}

.printing-batch-file-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  color: #334e68;
  transition: color 0.15s, transform 0.15s;
}

.printing-batch-file-link:hover,
.printing-batch-file-link:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.printing-batch-file-link img {
  width: 1.45rem;
  height: 1.45rem;
  display: block;
  filter: brightness(0) saturate(100%);
}

.printing-batch-file-link-pdf img {
  filter: brightness(0) saturate(100%) invert(19%) sepia(96%) saturate(2526%) hue-rotate(347deg) brightness(88%) contrast(98%);
}

.printing-batch-file-link-zip img {
  filter: brightness(0) saturate(100%) invert(49%) sepia(95%) saturate(550%) hue-rotate(7deg) brightness(97%) contrast(95%);
}

.printing-batch-file-link-pdf:hover img,
.printing-batch-file-link-pdf:focus-visible img {
  filter: brightness(0) saturate(100%) invert(15%) sepia(99%) saturate(3492%) hue-rotate(350deg) brightness(94%) contrast(100%);
}

.printing-batch-file-link-zip:hover img,
.printing-batch-file-link-zip:focus-visible img {
  filter: brightness(0) saturate(100%) invert(42%) sepia(94%) saturate(769%) hue-rotate(5deg) brightness(98%) contrast(98%);
}

.printing-batches-table-archived th:last-child,
.printing-batches-table-archived td:last-child {
  width: 1%;
}

.printing-archived-batches-toggle {
  justify-content: flex-start;
  margin-top: 1.15rem;
}

.printing-archived-batches-note {
  margin: 0.65rem 0 0;
  color: #52667a;
  font-size: 0.86rem;
  line-height: 1.45;
}

.printing-batch-actions-archived {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  width: max-content;
  max-width: 100%;
  margin-left: auto;
}

.scan-history-table {
  min-width: 0;
  background: white;
}

.scan-history-table td {
  vertical-align: middle;
}

.scan-history-table thead th:last-child,
.scan-history-table tbody td:last-child {
  text-align: right;
}

.scan-history-upload-cell {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.scan-history-upload-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.scan-history-upload-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  color: #486581;
  font-size: 0.8125rem;
}

.scan-history-upload-subtle {
  margin: 0;
  color: #829ab1;
  font-size: 0.8rem;
}

.scan-history-warning {
  margin: 0;
  color: #92400e;
  font-size: 0.8rem;
  line-height: 1.45;
}

.scan-history-warning-blocked {
  color: #991b1b;
}

.scan-upload-section-label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #627d98;
  text-transform: uppercase;
}

.scan-upload-version-summary,
.scan-upload-metrics {
  display: grid;
  gap: 0.45rem;
}

.scan-upload-version-list {
  display: grid;
  gap: 0.35rem;
}

.scan-upload-version-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.55rem;
  font-size: 0.8125rem;
  color: #486581;
}

.scan-upload-version-name {
  font-weight: 600;
  color: #102a43;
}

.scan-upload-version-line.is-current .scan-upload-version-name {
  color: #1746b6;
}

.scan-upload-version-count {
  color: #627d98;
}

.scan-upload-version-current-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #1746b6;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.scan-upload-metric-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  color: #486581;
  font-size: 0.8125rem;
}

.scan-history-metric-stack {
  display: grid;
  gap: 0.35rem;
  color: #334e68;
  font-size: 0.825rem;
}

.scan-history-metric-stack strong {
  color: #102a43;
}

.scan-history-metric-stack-muted {
  color: #627d98;
}

.scan-history-actions-cell {
  min-width: 0;
}

.scan-history-action-stack {
  display: grid;
  gap: 0.45rem;
  justify-items: end;
}

.scan-history-action-note {
  margin: 0;
  max-width: 14rem;
  font-size: 0.76rem;
  line-height: 1.4;
  color: #829ab1;
  text-align: right;
}

/* --- SR only --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Pre blocks --- */
pre {
  white-space: pre-wrap;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.75rem;
  font-size: 0.85rem;
}

/* --- Marketing landing page --- */
.gradebird-landing {
  padding: 0;
}

.marketing-shell {
  background:
    radial-gradient(circle at top left, rgba(51, 141, 255, 0.18), transparent 32%),
    radial-gradient(circle at top right, rgba(20, 87, 225, 0.14), transparent 28%),
    linear-gradient(180deg, #f7fbff 0%, #ffffff 34%, #f8fafc 100%);
  min-height: calc(100vh - 3.5rem);
  padding: 2rem 1rem 3rem;
}

.marketing-hero,
.marketing-section,
.marketing-cta-band,
.marketing-footer {
  max-width: 1200px;
  margin: 0 auto;
}

.marketing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.95fr);
  gap: 1.5rem;
  align-items: stretch;
  padding: 1rem 0 2.5rem;
}

.marketing-hero-copy,
.marketing-hero-panel,
.marketing-problem-card,
.marketing-workflow-card,
.marketing-benefit-card,
.marketing-proof-card,
.marketing-cta-band {
  border: 1px solid rgba(188, 204, 220, 0.8);
  box-shadow: 0 22px 45px rgba(16, 42, 67, 0.08);
}

.marketing-hero-copy {
  border-radius: 1.75rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(238, 247, 255, 0.96));
  padding: 2rem;
}

.marketing-kicker {
  margin: 0 0 0.75rem;
  color: #1457e1;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.marketing-hero-copy h1,
.marketing-section-heading h2,
.marketing-cta-band h2 {
  margin: 0;
  color: #102a43;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.marketing-hero-copy h1 {
  font-size: clamp(2.6rem, 6vw, 4.9rem);
  max-width: 12ch;
}

.marketing-lede,
.marketing-section-heading p,
.marketing-cta-band p,
.marketing-benefit-card p,
.marketing-proof-card p,
.marketing-workflow-card p,
.marketing-problem-card li {
  color: #486581;
  font-size: 1rem;
  line-height: 1.65;
}

.marketing-lede {
  margin: 1rem 0 0;
  max-width: 60ch;
}

.marketing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.marketing-actions .button {
  min-height: 2.9rem;
  padding-inline: 1.15rem;
}

.marketing-trust {
  display: grid;
  gap: 0.25rem;
  margin-top: 1.75rem;
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  background: rgba(20, 87, 225, 0.06);
  border: 1px solid rgba(20, 87, 225, 0.15);
  color: #243b53;
}

.marketing-trust-label,
.marketing-mini-label {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #1746b6;
}

.marketing-hero-panel {
  display: grid;
  gap: 1rem;
  border-radius: 1.75rem;
  padding: 1.25rem;
  background: linear-gradient(180deg, #193d8f 0%, #142757 100%);
  color: white;
}

.marketing-hero-card,
.marketing-stat-card {
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1.2rem;
}

.marketing-hero-card h2 {
  margin: 0.5rem 0 0;
  font-size: 1.55rem;
  line-height: 1.15;
}

.marketing-mini-list {
  margin: 1rem 0 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.65rem;
  color: rgba(255, 255, 255, 0.88);
}

.marketing-stat-grid,
.marketing-problem-grid,
.marketing-workflow-grid,
.marketing-benefit-grid,
.marketing-proof-grid,
.marketing-footer {
  display: grid;
  gap: 1rem;
}

.marketing-stat-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.marketing-stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
}

.marketing-stat-label {
  display: block;
  margin-top: 0.45rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.5;
}

.marketing-section {
  padding: 1.5rem 0;
}

.marketing-section-heading {
  max-width: 52rem;
  margin-bottom: 1.2rem;
}

.how-it-works-heading-wide {
  max-width: 64rem;
}

.how-it-works-intro {
  color: #486581;
  font-size: 1rem;
  line-height: 1.7;
}

.how-it-works-widget {
  display: grid;
  gap: 1.2rem;
}

.how-it-works-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.how-it-works-nav-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: start;
  width: 100%;
  padding: 1rem 1.05rem;
  border-radius: 1.35rem;
  border: 1px solid rgba(188, 204, 220, 0.85);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 30px rgba(16, 42, 67, 0.05);
  color: #334e68;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.how-it-works-nav-item:hover {
  transform: translateY(-1px);
  border-color: rgba(71, 133, 255, 0.35);
  box-shadow: 0 18px 34px rgba(16, 42, 67, 0.08);
}

.how-it-works-nav-item:focus-visible {
  outline: 3px solid rgba(26, 108, 245, 0.2);
  outline-offset: 2px;
}

.how-it-works-nav-item.is-active {
  border-color: rgba(26, 108, 245, 0.34);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(239, 247, 255, 0.96) 100%);
  box-shadow: 0 24px 40px rgba(16, 42, 67, 0.1);
  transform: translateY(-2px);
}

.how-it-works-nav-number {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef4fb;
  color: #486581;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
}

.how-it-works-nav-item.is-active .how-it-works-nav-number {
  background: #1746b6;
  color: white;
}

.how-it-works-nav-item.is-active .how-it-works-nav-copy strong {
  color: #1746b6;
}

.how-it-works-nav-copy {
  display: grid;
  gap: 0.18rem;
}

.how-it-works-nav-copy strong {
  color: #102a43;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
}

.how-it-works-nav-copy span {
  color: #627d98;
  font-size: 0.92rem;
  line-height: 1.45;
}

.how-it-works-panels {
  position: relative;
}

.how-it-works-panel {
  border-radius: 1.5rem;
  border: 1px solid rgba(188, 204, 220, 0.85);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 40px rgba(16, 42, 67, 0.07);
  padding: 1.6rem;
}

.how-it-works-panel-header {
  max-width: 48rem;
  margin-bottom: 1.3rem;
}

.how-it-works-panel-step {
  display: inline-flex;
  margin-bottom: 0.65rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: #eef4fb;
  color: #1746b6;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.how-it-works-panel-header h3 {
  margin: 0;
  color: #102a43;
  font-size: clamp(2rem, 3.1vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.how-it-works-panel-header p {
  margin: 0.85rem 0 0;
  color: #486581;
  font-size: 1.04rem;
  line-height: 1.75;
}

.how-it-works-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.how-it-works-panel-block {
  padding: 1.15rem 1.2rem;
  border-radius: 1.2rem;
  border: 1px solid rgba(188, 204, 220, 0.78);
  background: rgba(248, 250, 252, 0.9);
}

.how-it-works-panel-block h4 {
  margin: 0 0 0.7rem;
  color: #102a43;
  font-size: 1rem;
  font-weight: 800;
}

.how-it-works-panel-block .marketing-check-list {
  margin-top: 0;
}

.marketing-section-heading h2,
.marketing-cta-band h2 {
  font-size: clamp(2rem, 3.4vw, 3rem);
}

.marketing-heading-inline {
  max-width: none;
  white-space: nowrap;
}

.marketing-section-heading p,
.marketing-cta-band p {
  margin: 0.8rem 0 0;
}

.marketing-problem-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.marketing-problem-card h3 {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.marketing-problem-card,
.marketing-benefit-card,
.marketing-proof-card {
  border-radius: 1.35rem;
  background: rgba(255, 255, 255, 0.88);
  padding: 1.35rem;
}

.marketing-problem-card h3,
.marketing-benefit-card h3,
.marketing-proof-card h3,
.marketing-workflow-card h3 {
  margin: 0 0 0.7rem;
  color: #102a43;
  font-size: 1.2rem;
}

.marketing-check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.marketing-check-list li {
  position: relative;
  padding-left: 1.4rem;
}

.marketing-check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #338dff, #1746b6);
}

.marketing-workflow-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.marketing-workflow-card {
  border-radius: 1.5rem;
  background: linear-gradient(180deg, #ffffff 0%, #eef7ff 100%);
  padding: 1.4rem;
}

.marketing-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: #102a43;
  color: white;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.marketing-benefit-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.marketing-benefit-card {
  background: linear-gradient(180deg, rgba(20, 87, 225, 0.06), rgba(255, 255, 255, 0.95));
}

.marketing-proof-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.marketing-proof-card {
  background: white;
}

.marketing-cta-band {
  display: grid;
  grid-template-columns: auto minmax(0, 1.15fr) auto;
  gap: 1.3rem;
  align-items: center;
  margin-top: 2rem;
  max-width: 1080px;
  padding: 1.6rem;
  border-radius: 1.6rem;
  background: linear-gradient(135deg, #f7fbff, #eef7ff);
  border: 1px solid rgba(20, 87, 225, 0.14);
  box-shadow: 0 18px 36px rgba(16, 42, 67, 0.06);
}

.marketing-cta-band h2,
.marketing-cta-band p,
.marketing-cta-band .marketing-kicker {
  color: #102a43;
}

.marketing-cta-band h2 {
  font-size: clamp(1.75rem, 2.8vw, 2.45rem);
}

.marketing-cta-band .marketing-kicker {
  color: #1746b6;
}

.marketing-cta-band .button:not(.primary) {
  background: white;
  border-color: rgba(20, 87, 225, 0.16);
  color: #1746b6;
}

.marketing-cta-band .button:not(.primary):hover {
  background: #f8fbff;
}

.marketing-trust-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.95rem;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  background: white;
  border: 1px solid rgba(20, 87, 225, 0.14);
  color: #243b53;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.marketing-trust-inline-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  background: rgba(47, 157, 99, 0.12);
  color: #2f9d63;
  flex: 0 0 auto;
}

.marketing-trust-inline-icon svg {
  width: 0.95rem;
  height: 0.95rem;
}

.marketing-cta-band .marketing-actions {
  align-items: center;
  justify-content: center;
}

.marketing-cta-mark {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-right: 0.2rem;
  border-right: 1px solid rgba(20, 87, 225, 0.12);
}

.marketing-cta-logo {
  width: 72px;
  height: 100%;
  min-height: 92px;
  max-height: 132px;
  object-fit: contain;
  display: block;
  margin: 0;
}

.marketing-footer {
  display: block;
  margin-top: 1.1rem;
  padding: 0.2rem 0 0.4rem;
}

.marketing-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.87rem;
}

.marketing-footer-links,
.marketing-footer-links span {
  color: #829ab1;
}

.marketing-footer-links a {
  color: #829ab1;
  font-weight: 500;
}

.marketing-footer-links a:hover {
  color: #486581;
}

.legal-copy p {
  margin: 0.7rem 0 0;
  color: #486581;
  line-height: 1.72;
}

.legal-copy h3 + p {
  margin-top: 0.45rem;
}

.legal-copy h3:not(:first-child) {
  margin-top: 1.4rem;
}

.legal-document {
  max-width: 980px;
}

.legal-list {
  margin: 0;
  padding-left: 1.3rem;
  color: #486581;
  display: grid;
  gap: 1rem;
  line-height: 1.72;
}

.legal-list li::marker {
  color: #829ab1;
}

.legal-list strong {
  color: #102a43;
}

/* --- Responsive --- */
@media (max-width: 980px) {
  .grid.two, .roster-stats, .exam-grid, .grading-detail-layout, .scan-upload-grid, .scan-top-grid { grid-template-columns: 1fr; }
  .grading-detail-header { flex-direction: column; }
  .hero { flex-direction: column; }
  .dashboard-card-header { flex-direction: column; }
  .course-workspace-main { padding: 0.9rem 0 1.5rem; }
  .course-workspace-container { padding: 0 0.85rem; }
  .course-workspace-shell { padding: 0.15rem 0 0.15rem; }
  .course-header-title-row { align-items: flex-start; flex-direction: column; }
  .course-overview-stats { grid-template-columns: 1fr; }
  .course-overview-grid,
  .course-workspace-grid { grid-template-columns: 1fr; }
  .course-overview-hero { align-items: stretch; }
  .course-workspace-nav { gap: 0.45rem; }
  .course-exams-panel { max-width: none; }
  .course-workspace-table-row { flex-direction: column; }
  .course-workspace-table-side { justify-items: start; text-align: left; }
  .dashboard-exam-header-row { flex-direction: column; align-items: stretch; }
  .dashboard-exam-links { justify-content: flex-start; }
  .dashboard-exam-status-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .provider-table-header { display: none; }
  .provider-table-row { grid-template-columns: 1fr; gap: 0.75rem; }
  .provider-usage-summary-header { display: none; }
  .provider-usage-summary-row { grid-template-columns: 1fr; gap: 0.75rem; }
  .usage-table-header { display: none; }
  .usage-table-row { grid-template-columns: 1fr; gap: 0.75rem; }
  .usage-table-cost { justify-items: start; text-align: left; }
  .provider-pricing-table-header { display: none; }
  .provider-pricing-table-row { grid-template-columns: 1fr; gap: 0.75rem; }
  .provider-pricing-rate-cell { justify-items: start; text-align: left; }
  .provider-pricing-actions-cell { justify-items: start; }
  .provider-row-actions { justify-content: flex-start; }
  .provider-table-actions { justify-content: flex-start; }
  .agent-form-grid { grid-template-columns: 1fr; }
  .provider-form-actions { align-items: flex-start; flex-direction: column; }
  .provider-pricing-form-grid { grid-template-columns: 1fr; }
  .provider-model-checkbox-list > div,
  .provider-model-checkbox-list ul { grid-template-columns: 1fr; }
  .provider-inline-field { align-items: flex-start; flex-direction: column; gap: 0.35rem; }
  .batch-selection-visibility-grid { grid-template-columns: 1fr; }
  .batch-selection-inline-filter { align-items: flex-start; flex-direction: column; gap: 0.35rem; }
  .batch-selection-results-bar { align-items: flex-start; flex-direction: column; }
  .batch-anonymous-count-row { align-items: flex-start; flex-direction: column; gap: 0.35rem; }
  .batch-label-help { margin-left: 0; }
  .batch-submit-button { margin-top: 0; }
  .batch-section-list ul { columns: 1; }
  #printing-student-list ul { columns: 1; }
  #printing-student-list label {
    flex-wrap: wrap;
    white-space: normal;
    align-items: flex-start;
    overflow: visible;
  }
  #printing-student-list label > span {
    min-width: 0;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
  }
  .printing-batched-indicator {
    max-width: 100%;
  }
  .printing-batched-indicator-labels {
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .batch-mode-help {
    overflow-wrap: anywhere;
  }
  .exam-workflow-header { flex-direction: column; }
  .exam-workflow-title-row, .exam-workflow-title-group, .exam-workflow-controls-row, .exam-workflow-header-tools { align-items: flex-start; flex-direction: column; }
  .exam-workflow-header-actions { width: 100%; justify-content: flex-start; }
  .exam-workflow-shell {
    padding: 0.9rem 0.95rem 0.2rem;
    border-radius: 1.1rem;
  }
  .exam-workflow-heading-line { gap: 0.35rem; }
  .exam-workflow-title {
    font-size: clamp(2rem, 9vw, 2.8rem);
  }
  .exam-workflow-version-picker { width: 100%; }
  .exam-workflow-version-form { min-width: 0; width: 100%; }
  .exam-workflow-version-form select { min-width: 0; width: 100%; }
  .exam-workflow-warning-ack-label {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
  }
  .scan-upload-form-footer { align-items: stretch; }
  .scan-upload-actions { margin-left: 0; justify-content: flex-start; }
  .rubric-card { display: flex; flex-direction: column; }
  .rubric-card > .question-header,
  .rubric-card > .rubric-card-body { display: contents; }
  .rubric-card > .question-header .question-title { order: 1; }
  .rubric-card > .rubric-card-body .rubric-pane:first-child { order: 2; margin-top: 0.5rem; }
  .rubric-card > .question-header .question-actions { order: 3; width: 100%; margin-top: 0.75rem; justify-content: flex-start; }
  .rubric-card > .question-header .rubric-pane-controls { width: 100%; justify-content: space-between; }
  .rubric-card > .question-header .rubric-pane-controls-left { min-width: 0; }
  .rubric-card > .rubric-card-body .rubric-pane[data-rubric-published-panel] { order: 4; margin-top: 0.5rem; }
  .question-header, .rubric-card-body { grid-template-columns: 1fr; }
  .dashboard-stats { grid-template-columns: 1fr; }
  .builder-hero-copy { grid-template-columns: 1fr; }
  .builder-builder-title, .builder-title-mainline, .builder-title-row, .builder-title-main { align-items: flex-start; flex-direction: column; gap: 0.35rem; }
  .builder-builder-title { align-items: stretch; }
  .builder-title-topline {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.45rem 0.65rem;
  }
  .builder-version-mode-row, .builder-version-mode-form {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .builder-version-mode-form select { min-width: 5.5rem; width: auto; }
  .builder-title-controls { width: 100%; justify-content: flex-start; }
  .builder-title-utility-actions {
    justify-self: start;
    margin-left: 0;
    margin-top: 0.4rem;
    width: 100%;
    order: 99;
    justify-content: flex-end;
  }
  .builder-controls-grid { grid-template-columns: 1fr; }
  .builder-controls-section + .builder-controls-section { border-left: 0; border-top: 1px solid #e5e7eb; padding-left: 0; padding-top: 1.25rem; }
  .builder-hero-actions { align-items: flex-start; }
  .builder-admin-shortcut { justify-items: start; margin-top: 0; }
  .builder-admin-shortcut-row { align-items: flex-start; flex-direction: column; }
  .builder-version-action-row, .builder-version-inline-form { align-items: flex-start; flex-direction: column; flex-wrap: wrap; }
  .builder-version-inline-form select { width: 100%; min-width: 0; max-width: none; flex: none; }
  .publish-inline-bar { flex-direction: column; align-items: flex-start; }
  .publish-status-cluster { justify-content: flex-start; }
  .builder-workspace { display: block; }
  .builder-preview-toolbar { justify-content: flex-start; }
  .preview-view-controls { justify-content: flex-end; }
  .builder-column, .preview-column { min-width: 0; padding-right: 0; position: static; }
  .workspace-divider { display: none; }
  .compact-inline-row, .workspace-edit-row, .roster-review-row { grid-template-columns: 1fr; }
  .exam-workflow-nav {
    gap: 0.15rem 0.9rem;
    padding-bottom: 0.2rem;
  }
  .exam-workflow-content-shell {
    padding: 0.95rem;
    border-radius: 1rem;
  }
  .exam-workflow-tab-shell { flex-basis: auto; width: auto; }
  .exam-workflow-tab {
    padding: 0.3rem 0 0.72rem;
  }
  .exam-workflow-modal-backdrop { padding: 0.85rem; }
  .marketing-hero,
  .marketing-cta-band,
  .marketing-footer,
  .marketing-problem-grid,
  .marketing-benefit-grid,
  .marketing-proof-grid { grid-template-columns: 1fr; }
  .marketing-workflow-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .dashboard-exam-status-list { grid-template-columns: 1fr; }

  .batch-submit-main-row {
    align-items: stretch;
    flex-direction: column;
    gap: 0.75rem;
  }

  .batch-label-field {
    max-width: none;
    flex: none;
    width: 100%;
  }

  .batch-label-input-row {
    flex-wrap: wrap;
  }

  .batch-label-input-row input,
  .batch-label-input-row select,
  .batch-label-input-row textarea {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    min-height: 0;
  }

  .batch-submit-button {
    align-self: flex-start;
  }
}

@media (max-width: 720px) {
  .question-create-inline-fields { flex-direction: column; }
  .question-create-inline-field { width: 100%; }
  .question-workspace-inline-row { align-items: flex-start; }
  .question-collapsed-summary {
    flex-basis: 100%;
    max-width: 100%;
  }
  .question-preview-boxes-inline {
    flex-wrap: wrap;
  }
  .question-workspace-delete,
  .question-workspace-delete-spacer { display: none; }
  .marketing-shell {
    padding-inline: 0.85rem;
  }

  .marketing-hero-copy,
  .marketing-hero-panel,
  .marketing-problem-card,
  .marketing-workflow-card,
  .marketing-benefit-card,
  .marketing-proof-card,
  .marketing-cta-band {
    border-radius: 1.2rem;
    padding: 1.1rem;
  }

  .marketing-workflow-grid,
  .marketing-stat-grid {
    grid-template-columns: 1fr;
  }

  .marketing-actions {
    flex-direction: column;
  }

  .marketing-actions .button {
    width: 100%;
  }

  .marketing-cta-band {
    grid-template-columns: 1fr;
  }

  .marketing-cta-mark {
    align-self: auto;
    justify-content: flex-start;
    padding-right: 0;
    padding-bottom: 0.75rem;
    border-right: 0;
    border-bottom: 1px solid rgba(20, 87, 225, 0.12);
  }

  .marketing-cta-logo {
    width: 60px;
    min-height: 60px;
    max-height: 60px;
  }

  .marketing-footer-links {
    justify-content: flex-start;
  }
}

/* --- Marketing landing page v2 --- */
.marketing-hero {
  display: block;
  padding: 1.25rem 0 2rem;
}

.marketing-hero-simple {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1.7rem 3.1rem;
  border-radius: 2rem;
  border: 1px solid rgba(188, 204, 220, 0.85);
  background:
    radial-gradient(circle at top right, rgba(51, 141, 255, 0.14), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(238, 247, 255, 0.92));
  box-shadow: 0 24px 48px rgba(16, 42, 67, 0.08);
  text-align: center;
}

.marketing-hero-simple h1 {
  margin: 0;
  color: #102a43;
  font-size: clamp(3rem, 8vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.marketing-hero-subhead {
  margin: 0.65rem auto 0;
  max-width: 38ch;
  color: #1746b6;
  font-size: clamp(1.15rem, 2.2vw, 1.7rem);
  font-weight: 700;
  line-height: 1.2;
}

.marketing-hero-simple .marketing-lede {
  margin-inline: auto;
  max-width: 72ch;
  font-size: 1.06rem;
  line-height: 1.75;
}

.marketing-hero-simple .marketing-actions {
  justify-content: center;
}

.why-gradebird-hero {
  padding-top: 0.5rem;
}

.why-gradebird-hero-simple {
  max-width: 1080px;
  padding: 1.45rem 2.4rem;
}

.why-gradebird-hero-simple h1 {
  font-size: clamp(2.3rem, 4.8vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.why-gradebird-hero-simple .marketing-lede {
  max-width: 64ch;
  font-size: 1rem;
  line-height: 1.7;
}

.why-gradebird-hero-simple .marketing-hero-subhead {
  max-width: 52ch;
}

.marketing-section-heading .marketing-kicker-prominent {
  margin-bottom: 0.9rem;
  color: #1746b6;
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-transform: none;
}

#the-problem,
#grading-bottleneck,
#introducing-gradebird,
#get-started {
  scroll-margin-top: 5.5rem;
}

.marketing-problem-grid-two,
.marketing-benefit-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.marketing-bridge-section {
  padding-top: 0.2rem;
}

.marketing-bridge-card {
  max-width: 860px;
  margin: 0 auto;
  padding: 1.45rem 1.6rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(188, 204, 220, 0.8);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 36px rgba(16, 42, 67, 0.07);
  text-align: center;
}

.marketing-bridge-card h2 {
  margin: 0;
  color: #102a43;
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.marketing-bridge-card p {
  margin: 0.85rem auto 0;
  max-width: 38rem;
  color: #486581;
  font-size: 1.06rem;
  line-height: 1.7;
}

.marketing-bottleneck-card {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.4rem 1.5rem;
  border-radius: 1.4rem;
  border: 1px solid rgba(188, 204, 220, 0.8);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 36px rgba(16, 42, 67, 0.07);
}

.marketing-bottleneck-card h3 {
  margin: 0 0 0.8rem;
  color: #102a43;
  font-size: 1.2rem;
}

.marketing-bottleneck-card-combined {
  max-width: 1080px;
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(320px, 1fr);
  gap: 1.6rem;
  align-items: center;
  text-align: left;
  margin-left: 0;
  margin-right: auto;
}

.marketing-bottleneck-bridge {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 1.4rem;
  align-items: stretch;
  padding: 1.35rem 1.45rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(188, 204, 220, 0.8);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 36px rgba(16, 42, 67, 0.07);
}

.marketing-bottleneck-bridge-copy {
  display: grid;
  align-content: center;
  padding-right: 1.4rem;
  border-right: 1px solid rgba(188, 204, 220, 0.8);
}

.marketing-bottleneck-bridge-copy p {
  margin: 0;
  color: #102a43;
  font-size: 1.22rem;
  line-height: 1.7;
}

.marketing-bottleneck-points {
  margin: 0;
  padding: 0 0 0 1.2rem;
  display: grid;
  align-content: center;
  gap: 0.6rem;
}

.marketing-bottleneck-points li {
  color: #334e68;
  font-size: 1rem;
  line-height: 1.55;
}

.marketing-bottleneck-copy {
  display: grid;
  align-content: center;
  padding: 0.25rem 0;
}

.marketing-bottleneck-copy .marketing-check-list li {
  font-size: 1.34rem;
  line-height: 1.7;
}

.marketing-funnel-card {
  display: grid;
  justify-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.marketing-funnel-image {
  width: 100%;
  max-width: 430px;
  display: block;
  border-radius: 1rem;
}

.marketing-funnel-image-short {
  max-width: 320px;
}

.marketing-shift-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.52fr);
  gap: 0.9rem;
  align-items: stretch;
}

.marketing-shift-card {
  padding: 0;
  border-radius: 1.45rem;
  border: 1px solid;
  box-shadow: 0 18px 36px rgba(16, 42, 67, 0.08);
  overflow: hidden;
  min-height: 280px;
}

.marketing-shift-card h3 {
  margin: 1rem 0 0;
  font-size: 1.45rem;
}

.marketing-shift-card p:last-child {
  margin: 0.8rem 0 0;
}

.marketing-shift-card-negative {
  background: #fff;
  border-color: #d9e2ec;
  color: #334e68;
}

.marketing-shift-card-positive {
  background: linear-gradient(180deg, #f4fdf7 0%, #eefaf1 100%);
  border-color: #bfeecd;
  color: #166534;
}

.marketing-shift-label {
  margin: 0;
  display: inline-flex;
  padding: 0.82rem 1.35rem;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: white;
  border-radius: 0 0 0.62rem 0;
  line-height: 1;
}

.marketing-shift-card-negative .marketing-shift-label {
  background: #7b8794;
}

.marketing-shift-card-positive .marketing-shift-label {
  background: #2f9d63;
}

.marketing-shift-visual {
  display: grid;
  grid-template-columns: 128px 180px;
  align-items: start;
  justify-content: center;
  column-gap: 3.9rem;
  min-height: 210px;
  padding: 1.6rem 1.6rem 0.4rem;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}

.marketing-shift-visual-positive {
  grid-template-columns: 220px 180px 220px;
  justify-content: center;
  column-gap: 2rem;
}

.marketing-shift-icon-shell {
  width: 128px;
  height: 128px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.marketing-shift-icon-shell svg {
  width: 34px;
  height: 34px;
}

.marketing-icon-asset {
  width: 34px;
  height: 34px;
  display: block;
}

.marketing-icon-asset-shift {
  width: 72px;
  height: 72px;
}

.marketing-icon-asset-pencil {
  width: 82px;
  height: 82px;
  filter: grayscale(1) brightness(0.7);
}

.marketing-icon-asset-small {
  width: 24px;
  height: 24px;
}

.marketing-icon-asset-workflow {
  width: 52px;
  height: 52px;
}

.marketing-icon-asset-tiny {
  width: 14px;
  height: 14px;
}

.marketing-shift-icon-shell-negative {
  background: #f8fafc;
  color: #7b8794;
}

.marketing-shift-icon-shell-positive {
  background: white;
  border: 4px solid #34a266;
  color: #34a266;
}


.marketing-shift-arrow {
  position: relative;
  flex: 1 1 auto;
  min-width: 72px;
  align-self: start;
  margin-top: 58px;
}

.marketing-shift-arrow-dots {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 180px;
  flex: 0 0 180px;
}

.marketing-shift-arrow-dots span {
  width: 14px;
  height: 7px;
  background: #dbe4ef;
}

.marketing-shift-arrow-dots::after {
  content: "";
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 18px solid #dbe4ef;
}

.marketing-shift-arrow-solid {
  width: 180px;
  flex: 0 0 180px;
  height: 5px;
  background: #34a266;
  border-top: 0;
}

.marketing-shift-arrow-solid::after {
  content: "";
  position: absolute;
  right: -7px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 24px solid #34a266;
}

.marketing-shift-approval-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 220px;
  justify-content: flex-start;
  align-self: start;
}

.marketing-shift-approval-block span {
  font-size: 1.02rem;
  font-weight: 800;
  text-align: center;
  color: #334e68;
  line-height: 1.15;
  min-height: 2.5rem;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
}

.marketing-shift-card-positive .marketing-shift-title {
  color: #166534;
  font-weight: 700;
}

.marketing-shift-card-positive .marketing-shift-copy p:last-child {
  margin: 0.6rem 0 0;
  color: #166534;
}

.marketing-shift-word-negative {
  color: #ef4444;
  font-weight: 600;
}

.marketing-shift-word-positive {
  color: #2f9d63;
  font-weight: 600;
}

.marketing-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
  flex: 0 0 auto;
}

.marketing-icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.marketing-icon-negative {
  margin: 1rem auto 0;
  background: rgba(153, 27, 27, 0.12);
  color: #b91c1c;
}

.marketing-icon-positive,
.marketing-icon-trust,
.marketing-icon-benefit {
  background: rgba(20, 87, 225, 0.1);
  color: #1746b6;
}

.marketing-trust-banner {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: fit-content;
  max-width: 100%;
  margin: 1rem auto 0;
  padding: 1rem 1.15rem;
  border-radius: 1.1rem;
  background: #f8fbff;
  border: 1px solid rgba(20, 87, 225, 0.14);
}

.marketing-trust-grid {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.marketing-trust-grid-after-cta {
  max-width: 1200px;
  margin: 1rem auto 0;
}

.marketing-trust-banner p {
  margin: 0.2rem 0 0;
  color: #486581;
}

.marketing-workflow-card {
  position: relative;
  text-align: center;
  padding-top: 1.2rem;
}

.marketing-workflow-step-badge {
  position: absolute;
  top: 0.85rem;
  left: 0.95rem;
  color: #829ab1;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
}

.marketing-workflow-card h3 {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.08;
}

.marketing-workflow-card p {
  font-size: 1.02rem;
}

.marketing-workflow-card:last-child {
  background: linear-gradient(180deg, #f4fdf7 0%, #eefaf1 100%);
  border-color: #7ed9a1;
  border-width: 2px;
}

.marketing-workflow-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 102px;
  height: 102px;
  border-radius: 999px;
  margin: 0 auto 1rem;
  background: rgba(20, 87, 225, 0.08);
  color: #1746b6;
  border: 1px solid rgba(20, 87, 225, 0.12);
}

.marketing-workflow-icon svg {
  width: 40px;
  height: 40px;
}

.marketing-benefit-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.marketing-benefit-header h3 {
  margin: 0;
}

.marketing-benefit-card ul,
.marketing-bottleneck-card ul,
.marketing-problem-card ul {
  margin-top: 0.8rem;
}

@media (max-width: 980px) {
  .marketing-problem-grid-two,
  .marketing-benefit-grid-two,
  .marketing-shift-grid,
  .marketing-bottleneck-card-combined,
  .marketing-bottleneck-bridge {
    grid-template-columns: 1fr;
  }

  .how-it-works-nav,
  .how-it-works-panel-grid {
    grid-template-columns: 1fr;
  }

  .marketing-bottleneck-bridge-copy {
    padding-right: 0;
    padding-bottom: 1rem;
    border-right: 0;
    border-bottom: 1px solid rgba(188, 204, 220, 0.8);
  }

  .marketing-shift-visual-positive {
    justify-content: center;
  }

  .marketing-bottleneck-copy .marketing-check-list li {
    font-size: 1.15rem;
  }
}

@media (max-width: 720px) {
  .marketing-hero-simple {
    padding: 1.3rem 1rem;
    border-radius: 1.35rem;
  }

  .how-it-works-panel {
    padding: 1.2rem;
  }

  .how-it-works-nav-item {
    padding: 0.95rem 1rem;
  }

  .marketing-shift-visual,
  .marketing-shift-visual-positive {
    display: flex;
    flex-direction: column;
  }

  .marketing-trust-banner {
    align-items: flex-start;
  }

  .marketing-shift-arrow-solid {
    width: 4px;
    height: 52px;
    background: #34a266;
    border-left: 0;
  }

  .marketing-shift-arrow-solid::after {
    top: auto;
    bottom: -1px;
    left: -7px;
    right: auto;
    transform: none;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 18px solid #34a266;
    border-bottom: 0;
  }
}

/* --- Auth pages --- */
.auth-main {
  max-width: 100%;
  padding: 1rem 0 0;
  background:
    radial-gradient(circle at top left, rgba(51, 141, 255, 0.14), transparent 26%),
    linear-gradient(180deg, #f7fbff 0%, #ffffff 42%, #f8fafc 100%);
}

.auth-page {
  min-height: calc(100vh - 3.5rem);
  padding: 2rem 1rem 3rem;
}

.auth-shell {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(340px, 0.9fr);
  gap: 1.25rem;
  align-items: stretch;
}

.auth-shell-single {
  max-width: 620px;
  grid-template-columns: minmax(0, 1fr);
}

.auth-shell-stacked {
  gap: 0.9rem;
}

.auth-page-compact {
  display: grid;
  place-items: center;
}

.auth-aside,
.auth-form-card,
.signup-free-card {
  border-radius: 1.6rem;
  border: 1px solid rgba(188, 204, 220, 0.88);
  box-shadow: 0 22px 45px rgba(16, 42, 67, 0.08);
}

.auth-aside {
  padding: 2rem;
  background:
    radial-gradient(circle at top right, rgba(51, 141, 255, 0.14), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(238, 247, 255, 0.94));
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: #102a43;
  font-size: 1.1rem;
  font-weight: 800;
}

.auth-brand-logo {
  width: 2.9rem;
  height: 2.9rem;
  object-fit: contain;
}

.auth-eyebrow {
  margin: 1.5rem 0 0;
  color: #1457e1;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-aside h1,
.auth-form-card h2 {
  margin: 0.55rem 0 0;
  color: #102a43;
  line-height: 1.03;
  letter-spacing: -0.03em;
}

.auth-aside h1 {
  font-size: clamp(2rem, 3.6vw, 3.2rem);
  max-width: 13ch;
  line-height: 1.04;
}

.auth-copy,
.auth-form-header p,
.auth-switch-copy,
.auth-field-help {
  color: #486581;
}

.auth-copy {
  margin: 1rem 0 0;
  max-width: 34rem;
  font-size: 1.06rem;
  line-height: 1.75;
}

.signup-free-note {
  padding: 1rem 1.1rem;
}

.signup-free-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(238, 247, 255, 0.94));
}

.auth-form-card {
  background: #fff;
}

.signup-free-note {
  padding: 1rem 1.1rem;
}

.signup-free-note h1 {
  margin: 0;
  color: #102a43;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.signup-free-note p {
  margin: 0.35rem 0 0;
  color: #486581;
  font-size: 0.96rem;
  line-height: 1.55;
}

.auth-points {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}

.auth-points li {
  position: relative;
  padding-left: 1.5rem;
  color: #243b53;
  font-size: 1rem;
  line-height: 1.6;
}

.auth-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #338dff, #1746b6);
}

.auth-form-card {
  padding: 1.8rem;
  background: rgba(255, 255, 255, 0.96);
}

.auth-form-card-centered {
  width: min(100%, 620px);
}

.auth-form-header {
  margin-bottom: 1.2rem;
}

.auth-form-header h2 {
  font-size: clamp(1.9rem, 3.3vw, 2.8rem);
}

.auth-form-header p {
  margin: 0.85rem 0 0;
  max-width: 32rem;
  line-height: 1.65;
}

.auth-form {
  gap: 1rem;
}

.auth-field {
  display: grid;
  gap: 0.4rem;
}

.auth-field input,
.auth-field textarea {
  min-height: 3rem;
  border-radius: 0.85rem;
  font-size: 0.96rem;
  padding: 0.8rem 0.95rem;
}

.auth-field textarea {
  min-height: 8.5rem;
  resize: vertical;
}

.auth-field-help {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
}

.auth-required {
  color: #1457e1;
}

.auth-submit {
  width: 100%;
  min-height: 3.15rem;
  margin-top: 0.2rem;
  border-radius: 0.9rem;
  font-size: 0.96rem;
}

.auth-switch-copy {
  margin: 1rem 0 0;
  font-size: 0.92rem;
}

.auth-switch-copy a {
  color: #1746b6;
  font-weight: 700;
}

.account-shell {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1.22fr);
  gap: 1.25rem;
  align-items: start;
}

.account-sidebar,
.account-panel,
.account-card {
  border-radius: 1.6rem;
  border: 1px solid rgba(188, 204, 220, 0.88);
  box-shadow: 0 22px 45px rgba(16, 42, 67, 0.08);
  background: rgba(255, 255, 255, 0.96);
}

.account-sidebar {
  padding: 2rem;
  position: sticky;
  top: 5rem;
  background:
    radial-gradient(circle at top right, rgba(51, 141, 255, 0.14), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(238, 247, 255, 0.94));
}

.account-sidebar h1 {
  margin: 0.55rem 0 0;
  color: #102a43;
  font-size: clamp(2rem, 3vw, 2.7rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.account-copy {
  margin: 0.9rem 0 0;
  color: #486581;
  line-height: 1.7;
}

.account-nav {
  margin-top: 1.6rem;
  display: grid;
  gap: 0.65rem;
}

.account-nav-link {
  display: block;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  color: #243b53;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(188, 204, 220, 0.9);
  font-weight: 700;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.account-nav-link:hover,
.account-nav-link:focus-visible,
.account-nav-link.is-active {
  color: #1746b6;
  border-color: rgba(89, 176, 255, 0.9);
  background: rgba(238, 247, 255, 0.95);
}

.account-panel {
  padding: 1.2rem;
  display: grid;
  gap: 1rem;
}

.account-card {
  padding: 1.4rem;
}

.account-card-header h2 {
  margin: 0.45rem 0 0;
  color: #102a43;
  font-size: clamp(1.45rem, 2vw, 1.9rem);
  line-height: 1.12;
}

.account-card-header p:last-child {
  margin: 0.75rem 0 0;
  color: #486581;
  line-height: 1.65;
}

.account-email-list {
  display: grid;
  gap: 0.8rem;
}

.account-email-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
  padding: 1rem 1.05rem;
  border-radius: 1rem;
  border: 1px solid #d9e2ec;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.account-email-radio {
  padding-top: 0.15rem;
}

.account-email-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.account-email-address {
  color: #102a43;
  font-weight: 700;
  word-break: break-word;
}

.account-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  background: #e8f1ff;
  color: #1746b6;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.account-pill-success {
  background: #e7f7ef;
  color: #217a4b;
}

.account-pill-warning {
  background: #fff4db;
  color: #946200;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.account-secondary-link {
  color: #1746b6;
  font-weight: 700;
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-aside h1 {
    max-width: none;
  }

  .account-shell {
    grid-template-columns: 1fr;
  }

  .account-sidebar {
    position: static;
  }
}

@media (max-width: 720px) {
  .auth-page {
    padding: 1rem 0.85rem 2rem;
  }

  .auth-aside,
  .auth-form-card {
    padding: 1.2rem;
    border-radius: 1.2rem;
  }

  .account-sidebar,
  .account-panel,
  .account-card {
    border-radius: 1.2rem;
  }

  .account-sidebar,
  .account-panel,
  .account-card {
    padding: 1.2rem;
  }
}
