/* FastFeedback Design System (fds) components. Needs tokens.css first.
   Every class is prefixed fds- so it never collides with Bootstrap or the legacy ff-* page styles.
   Catalogue with Figma sources: docs/design/components.md. */

[hidden] { display: none !important; }

/* Greyscale antialiasing on macOS, as Figma renders text: lighter, crisper Inter (no effect elsewhere). */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Icons ---------- */
/* Inline SVG icon from {% icon %} (core/icons.py). Strokes and fills use currentColor, so set `color`. */
.fds-icon {
  display: inline-block;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.fds-icon-12 { width: 12px; height: 12px; }
.fds-icon-14 { width: 14px; height: 14px; }
.fds-icon-20 { width: 20px; height: 20px; }
.fds-icon-24 { width: 24px; height: 24px; }
.fds-icon-26 { width: 26px; height: 26px; }

/* Round status icon (Figma static icons): 46px, or 62px with -lg. */
.fds-icon-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: var(--fds-radius-pill);
  background: var(--fds-primary);
  color: var(--fds-white);
}

.fds-icon-badge-teal { background: var(--fds-teal-500); }
.fds-icon-badge-red { background: var(--fds-red-600); }
.fds-icon-badge-yellow { background: var(--fds-yellow-500); }
.fds-icon-badge-lg { width: 62px; height: 62px; }

/* ---------- Buttons ---------- */
.fds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: var(--fds-radius-sm);
  background: transparent;
  font-family: var(--fds-font-sans);
  font-size: 15px;
  font-weight: 600;
  line-height: normal;
  letter-spacing: 0.075px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.fds-btn:focus-visible { outline: 2px solid var(--fds-primary); outline-offset: 2px; }

.fds-btn-primary { background: var(--fds-primary); border-color: var(--fds-primary); color: var(--fds-white); }
.fds-btn-primary:hover { background: var(--fds-primary-hover); border-color: var(--fds-primary-hover); color: var(--fds-white); }

.fds-btn-outline { background: var(--fds-white); border-color: var(--fds-primary); color: var(--fds-primary); }
.fds-btn-outline:hover { background: var(--fds-blue-50); color: var(--fds-primary); }

/* Outline gray (Preline outline/gray, data table proposal "Edit question"): quiet secondary action. */
.fds-btn-outline-gray { background: transparent; border-color: var(--fds-gray-500); color: var(--fds-gray-500); }
.fds-btn-outline-gray:hover { border-color: var(--fds-gray-800); color: var(--fds-gray-800); }

/* Outline on a dark panel. */
.fds-btn-outline-light { border-color: var(--fds-white); color: var(--fds-white); }
.fds-btn-outline-light:hover { background: rgba(255, 255, 255, 0.1); color: var(--fds-white); }

/* Disabled primary (Figma bg-disabled): use on a <button disabled> or an <a aria-disabled="true"> without href. */
.fds-btn-primary:disabled,
.fds-btn-primary[aria-disabled="true"] {
  background: var(--fds-blue-400);
  border-color: var(--fds-blue-400);
  color: var(--fds-blue-50);
  cursor: default;
  pointer-events: none;
}

.fds-btn-sm { padding: 10px 12px; line-height: 18px; }
.fds-btn-block { display: flex; width: 100%; }

/* Square icon-only button. 38px; -lg is 46px; -on-dark for the sidebar. */
.fds-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: var(--fds-radius-sm);
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.fds-icon-btn:hover { background: var(--fds-slate-100); }
.fds-icon-btn:focus-visible { outline: 2px solid var(--fds-primary); outline-offset: 2px; }
.fds-icon-btn-lg { width: 46px; height: 46px; }
.fds-icon-btn-on-dark:hover { background: rgba(255, 255, 255, 0.08); }

.fds-link {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.07px;
  color: var(--fds-primary);
  text-decoration: none;
}

.fds-link:hover { color: var(--fds-primary); text-decoration: underline; }

/* ---------- Form fields ---------- */
.fds-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.fds-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.fds-label {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.07px;
  color: var(--fds-text-label);
}

.fds-input-wrap {
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--fds-white);
  border: 1px solid var(--fds-border-input);
  border-radius: var(--fds-radius-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.fds-input-wrap:focus-within { border-color: var(--fds-primary); box-shadow: var(--fds-focus-ring); }
.fds-input-wrap.is-invalid { border-color: var(--fds-danger); }

.fds-input {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-family: var(--fds-font-sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.075px;
  color: var(--fds-text-label);
}

.fds-input::placeholder { color: var(--fds-placeholder); opacity: 1; }

/* Button inside an input (e.g. show/hide password); dims until pressed. */
.fds-input-btn {
  display: flex;
  align-items: center;
  align-self: stretch;
  padding: 0 16px;
  border: 0;
  background: transparent;
  color: var(--fds-gray-500);
  cursor: pointer;
  opacity: 0.6;
}

.fds-input-btn[aria-pressed="true"] { opacity: 1; }

.fds-hint,
.fds-error {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.07px;
}

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

.fds-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  letter-spacing: 0.07px;
  color: var(--fds-text-label);
  cursor: pointer;
}

.fds-check input {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--fds-primary);
}

.fds-check a { color: var(--fds-primary); text-decoration: none; }

/* Label + (?) icon whose data-tip shows as a tooltip on hover/focus. Below 1024px (lg) the icon
   hides and the matching .fds-hint-inline shows under the field instead. */
.fds-label-help { display: flex; align-items: center; gap: 6px; }

.fds-help {
  position: relative;
  display: inline-flex;
  border-radius: var(--fds-radius-pill);
  color: var(--fds-slate-400);
  cursor: help;
}

.fds-help:focus-visible { outline: 2px solid var(--fds-primary); outline-offset: 2px; }

.fds-help::after,
.fds-help::before {
  position: absolute;
  z-index: 10;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s, visibility 0.15s;
}

.fds-help::after {
  content: attr(data-tip);
  left: -12px;
  bottom: calc(100% + 10px);
  width: max-content;
  max-width: 280px;
  padding: 8px 12px;
  border-radius: var(--fds-radius-sm);
  background: var(--fds-gray-800);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
  color: var(--fds-white);
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  letter-spacing: 0;
}

.fds-help::before {
  content: "";
  left: 2px;
  bottom: calc(100% - 2px);
  border: 6px solid transparent;
  border-top-color: var(--fds-gray-800);
}

.fds-help:hover::after,
.fds-help:hover::before,
.fds-help:focus-visible::after,
.fds-help:focus-visible::before { opacity: 1; visibility: visible; }

.fds-hint-inline { display: none; }

/* "OR" with a line either side. */
.fds-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  letter-spacing: 0.08px;
  color: var(--fds-gray-500);
}

.fds-divider::before,
.fds-divider::after { content: ""; flex: 1; height: 1px; background: var(--fds-border-input); }

/* ---------- Alerts and notes ---------- */
.fds-alerts { display: flex; flex-direction: column; gap: 8px; }

.fds-alert {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--fds-blue-200);
  border-radius: var(--fds-radius-sm);
  background: var(--fds-blue-50);
  color: var(--fds-blue-900);
  font-size: 14px;
  font-weight: 500;
}

.fds-alert-error { border-color: var(--fds-red-200); background: var(--fds-red-50); color: var(--fds-red-800); }
.fds-alert-success { border-color: var(--fds-green-200); background: var(--fds-green-50); color: var(--fds-green-800); }
.fds-alert-warning { border-color: var(--fds-amber-200); background: var(--fds-amber-50); color: var(--fds-amber-800); }

.fds-note {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--fds-radius-sm);
  background: var(--fds-slate-100);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--fds-text-secondary);
}

.fds-note a { color: var(--fds-primary); text-decoration: none; }
.fds-note a:hover { text-decoration: underline; }

/* ---------- Badges (Figma 626:13954) ----------
   Pill, 28px high: 6px padding + 0 4px label slot, 12/500/16 text.
   Soft category: -blue, -teal, -green. Soft status adds .fds-badge-dot (dot in the text colour):
   -blue "Live", -yellow "Draft", -gray "Archived". -outline-light sits on dark or coloured heroes. */
.fds-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: var(--fds-radius-pill);
  font-size: 12px;
  line-height: 14px;
  font-weight: 500;
  letter-spacing: 0.06px;
  white-space: nowrap;
}

.fds-badge-dot::before {
  content: "";
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: var(--fds-radius-pill);
  background: currentColor;
}

.fds-badge-blue { background: var(--fds-blue-100); color: var(--fds-blue-800); }
.fds-badge-teal { background: var(--fds-teal-100); color: var(--fds-teal-800); }
.fds-badge-green { background: var(--fds-green-50); color: var(--fds-green-700); }
.fds-badge-yellow { background: var(--fds-yellow-100); color: var(--fds-yellow-800); }
.fds-badge-gray { background: var(--fds-gray-100); color: var(--fds-gray-800); }
.fds-badge-red { background: var(--fds-red-100); color: var(--fds-red-800); }
.fds-badge-outline-light { border-color: var(--fds-white); color: var(--fds-white); }

/* Small badge (Figma _badge-and-tag-small): 10/500/16, 18px high. The default size for every badge
   in the app (lists, tables, page heads, scores, tab counters); the 28px base is for hero badges only. */
.fds-badge-sm {
  gap: 4px;
  min-width: 18px;
  justify-content: center;
  padding: 1px 5px;
  font-size: 10px;
  line-height: 14px;
  letter-spacing: 0.05px;
}

.fds-badge-solid-blue { background: var(--fds-primary); color: var(--fds-white); }
.fds-badge-solid-red { background: var(--fds-red-500); color: var(--fds-white); }
.fds-badge-solid-teal { background: var(--fds-teal-500); color: var(--fds-white); }
.fds-badge-solid-dark { background: var(--fds-gray-800); color: var(--fds-white); }

/* Counter badge (solid): count + white dot + label, e.g. "4 • Submitted". Colour via -red/-blue/-teal/-dark/-gray/-yellow. */
.fds-counter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: var(--fds-radius-pill);
  background: var(--fds-gray-800);
  color: var(--fds-white);
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.06px;
  white-space: nowrap;
}

.fds-counter b { font-size: 14px; line-height: 20px; font-weight: 600; letter-spacing: 0.07px; }

.fds-counter b::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 8px;
  border-radius: var(--fds-radius-pill);
  background: currentColor;
  vertical-align: middle;
}

.fds-counter-red { background: var(--fds-red-500); }
.fds-counter-blue { background: var(--fds-primary); }
.fds-counter-teal { background: var(--fds-teal-500); }
.fds-counter-dark { background: var(--fds-gray-800); }
.fds-counter-gray { background: var(--fds-gray-500); }
.fds-counter-yellow { background: var(--fds-yellow-500); }

/* Outlined status badge with a coloured dot (Figma "Badge and Tag", e.g. In progress / Not started). */
.fds-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 10px;
  border: 1px solid var(--fds-gray-200);
  border-radius: var(--fds-radius-xs);
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.06px;
  color: var(--fds-gray-500);
  white-space: nowrap;
}

.fds-status::before {
  content: "";
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: var(--fds-radius-pill);
  background: var(--fds-gray-400);
}

.fds-status-teal::before { background: var(--fds-teal-500); }
.fds-status-yellow::before { background: var(--fds-yellow-500); }
.fds-status-green::before { background: var(--fds-green-600); }
.fds-status-blue::before { background: var(--fds-primary); }
.fds-status-red::before { background: var(--fds-red-500); }

/* Dark square icon (Figma static icon "solid dark", small). */
.fds-icon-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: var(--fds-radius-sm);
  background: var(--fds-gray-800);
  color: var(--fds-white);
}

/* ---------- Cards (Preline card) ---------- */
.fds-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
  padding: 24.682px;
  background: var(--fds-surface);
  border: 0.682px solid var(--fds-border-card);
  border-radius: var(--fds-radius-xl);
  box-shadow: var(--fds-shadow-card);
}

/* Description list: label / value rows split by lines (account details, quiz facts). */
.fds-dl { display: flex; flex-direction: column; margin: 0; }

.fds-dl > div {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 2fr;
  gap: 4px 16px;
  padding: 12px 0;
  border-top: 1px solid var(--fds-gray-200);
}

.fds-dl > div:first-child { border-top: 0; padding-top: 0; }
.fds-dl > div:last-child { padding-bottom: 0; }
.fds-dl dt { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--fds-gray-500); }
.fds-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--fds-gray-800); }
.fds-dl .fds-dl-note { display: block; font-weight: 400; color: var(--fds-gray-500); }

/* Feed / list card (Figma Submissions Feed 594:89578): the main card of a list page, holding its
   title, tabs, filters and the list. Stronger border, md shadow, 32px padding, 16px gaps. */
.fds-card-feed {
  gap: 16px;
  padding: 32px;
  border: 1px solid var(--fds-slate-300);
  box-shadow: var(--fds-shadow-md);
}

.fds-card-head { display: flex; flex-direction: column; gap: 4px; }

.fds-card-title {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  letter-spacing: -0.3125px;
  color: var(--fds-text-heading);
}

.fds-card-desc {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.1504px;
  color: var(--fds-text-muted);
}

.fds-empty { margin: 0; font-size: 14px; color: var(--fds-text-muted); }

/* ---------- Feed list (Figma Activity Feed rows 608:71722) ---------- */
.fds-feed-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fds-feed-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: var(--fds-radius-md);
  background: var(--fds-slate-100);
}

.fds-feed-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--fds-radius-md);
  background: var(--fds-blue-950);
  color: var(--fds-white);
  font-size: 13px;
  font-weight: 600;
}

.fds-feed-text { flex: 1; min-width: 0; }

.fds-feed-title {
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  letter-spacing: -0.3125px;
  color: var(--fds-text-heading);
  overflow-wrap: anywhere;
}

.fds-feed-meta { font-size: 14px; line-height: 20px; color: var(--fds-text-muted); }

/* ---------- Scroll list (Figma Card Scrolls 612:60507) ----------
   A scrolling list of bordered rows: icon tile, head (title + meta + action), divider, body.
   Put it in .fds-table-wrap for the frame, with an optional .fds-card-footer for pagination. */
.fds-scroll-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 600px;
  margin: 0;
  padding: 16px;
  overflow-y: auto;
  list-style: none;
}

.fds-scroll-item {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 25px;
  border: 1px solid var(--fds-gray-200);
  border-radius: var(--fds-radius-md);
}

.fds-scroll-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.fds-scroll-head {
  display: flex;
  align-items: center;
  gap: 8px 16px;
}

.fds-scroll-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.fds-scroll-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  letter-spacing: 0.08px;
  color: var(--fds-gray-800);
}

/* Label/value pairs: <span><b>Class:</b> 10Keller</span> */
.fds-scroll-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0.08px;
  color: var(--fds-gray-800);
}

.fds-scroll-title b,
.fds-scroll-meta b { font-weight: 500; }

.fds-scroll-item .fds-progress { max-width: 540px; }

.fds-scroll-item hr {
  width: 100%;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--fds-gray-200);
  opacity: 1;
}

/* ---------- Progress bar (Figma "Progress & score colours" 155826:4180) ----------
   Progress only ("how much is done?"): always blue-600 on a slate-200 track, 6px, radius 3,
   value on the right. 0% is an empty track. Scores are badges, never this bar. */
.fds-progress { display: flex; align-items: center; gap: 10px; }

.fds-progress-track {
  display: block;
  flex: 1;
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--fds-slate-200);
}

.fds-progress-bar {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--fds-primary);
}

.fds-progress-value {
  font-size: 13px;
  line-height: 16px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--fds-slate-700);
}

/* ---------- Charts: ring and half gauge, drawn from --pct (0-100) ---------- */
.fds-ring-card {
  padding: 10px;
  border-radius: var(--fds-radius-pill);
  background: var(--fds-white);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

.fds-ring {
  --pct: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 200px;
  border-radius: var(--fds-radius-pill);
}

.fds-ring::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--fds-radius-pill);
  background: conic-gradient(var(--fds-purple-600) calc(var(--pct) * 1%), var(--fds-gray-200) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 10px), #000 calc(100% - 9px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 10px), #000 calc(100% - 9px));
}

.fds-ring-value {
  font-size: 48px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: 0.24px;
  color: var(--fds-gray-800);
}

.fds-ring-label {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.09px;
  color: var(--fds-gray-500);
}

.fds-gauge {
  --pct: 0;
  --fill: var(--fds-blue-600);
  --rest: var(--fds-blue-200);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: 200px;
  height: 100px;
  overflow: hidden;
  color: var(--fds-white);
  text-align: center;
}

.fds-gauge::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 200px;
  height: 200px;
  border-radius: var(--fds-radius-pill);
  background: conic-gradient(from -90deg, var(--fill) calc(var(--pct) * 0.5%), var(--rest) 0 50%, transparent 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 20px), #000 calc(100% - 19px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 20px), #000 calc(100% - 19px));
}

/* A gauge showing a score takes the score colour (`fds-gauge-{{ pct|score_tone }}`), with a
   neutral rest so the fill is the only colour (Figma "Progress & score colours"). */
.fds-gauge-good, .fds-gauge-ok, .fds-gauge-low { --rest: rgb(255 255 255 / 0.16); }
.fds-gauge-good { --fill: var(--fds-green-600); }
.fds-gauge-ok { --fill: var(--fds-yellow-500); }
.fds-gauge-low { --fill: var(--fds-red-600); }

.fds-gauge-label {
  position: relative;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.06px;
}

.fds-gauge-value {
  position: relative;
  font-size: 20px;
  line-height: 24px;
  font-weight: 700;
  letter-spacing: 0.1px;
}

/* ---------- More buttons ---------- */
.fds-btn-lg { padding: 22px 20px; }
.fds-btn-dark { background: var(--fds-gray-800); border-color: var(--fds-gray-800); color: var(--fds-white); }
.fds-btn-dark:hover { background: var(--fds-slate-900); color: var(--fds-white); }
.fds-btn-danger { background: var(--fds-white); border-color: var(--fds-red-500); color: var(--fds-red-500); }
.fds-btn-danger:hover { background: var(--fds-red-50); color: var(--fds-red-700); }
.fds-btn-ghost { color: var(--fds-primary); }
.fds-btn-ghost:hover { background: var(--fds-blue-50); color: var(--fds-primary-hover); }
.fds-btn-outline:disabled,
.fds-btn-outline[aria-disabled="true"] { border-color: var(--fds-blue-200); color: var(--fds-blue-200); pointer-events: none; }

/* Large outline button on a coloured hero (Figma _button-large, outline light). */
.fds-btn-hero {
  padding: 22px 20px;
  border-color: var(--fds-white);
  color: var(--fds-white);
  box-shadow: var(--fds-shadow-button);
}

.fds-btn-hero:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.7); color: rgba(255, 255, 255, 0.7); }

/* Icon-only small button (Figma _button-small, 38x34): View / Send / Delete in tables and cards. */
.fds-btn-icon { width: 38px; height: 34px; padding: 0; }
.fds-btn-icon.fds-btn-plain { color: var(--fds-red-500); }
.fds-btn-plain:hover { background: var(--fds-gray-100); }

/* Form wrapping a single button (POST actions in lists). */
.fds-inline-form { display: inline-flex; margin: 0; }

/* ---------- Stat cards (Figma Stats Cards 594:160767) ----------
   White card: outlined icon ring + counter badge + caption. Colour via fds-stat-red/-blue/-teal/-dark/-gray/-yellow.
   As a link it lifts on hover (Figma draws the raised state on the dashboard). */
.fds-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.fds-stat {
  --stat: var(--fds-gray-800);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  min-width: 0;
  min-height: 160px;
  padding: 24px;
  background: var(--fds-surface);
  border: 1px solid var(--fds-border-card);
  border-radius: var(--fds-radius-xl);
  box-shadow: var(--fds-shadow-sm);
  color: inherit;
  text-decoration: none;
  transition: box-shadow 0.15s, transform 0.15s;
}

a.fds-stat:hover,
a.fds-stat:focus-visible { box-shadow: var(--fds-shadow-raised); color: inherit; transform: translateY(-1px); }
a.fds-stat:focus-visible { outline: 2px solid var(--fds-primary); outline-offset: 2px; }

.fds-stat.is-active { border-color: var(--stat); box-shadow: 0 0 0 1px var(--stat), var(--fds-shadow-raised); }
.fds-stat-dashed { border: 2px dashed var(--fds-gray-200); }

.fds-stat-ring {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--stat);
  border-radius: var(--fds-radius-pill);
  color: var(--stat);
}

.fds-stat .fds-counter { align-self: flex-start; background: var(--stat); }

.fds-stat-caption {
  margin: -8px 0 0;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.07px;
  color: var(--fds-text-muted);
}

.fds-stat-red { --stat: var(--fds-red-500); }
.fds-stat-blue { --stat: var(--fds-primary); }
.fds-stat-teal { --stat: var(--fds-teal-500); }
.fds-stat-dark { --stat: var(--fds-gray-800); }
.fds-stat-gray { --stat: var(--fds-gray-500); }
.fds-stat-yellow { --stat: var(--fds-yellow-500); }

/* ---------- Hero sections (Figma 596:75740) ----------
   White welcome hero (title with a blue accent) or a coloured section hero: -indigo (Classes),
   -blue (Quizzes), -sky (Question Bank), -violet (Submission Centre). -sm for a shorter one,
   -compact for a selected item. */
.fds-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  min-height: 282px;
  padding: 40px;
  background: var(--fds-surface);
  border-radius: var(--fds-radius-2xl);
  box-shadow: var(--fds-shadow-soft);
  color: var(--fds-text-heading);
}

.fds-hero-text { flex: 1; min-width: 0; }

.fds-hero-title {
  margin: 0;
  font-size: clamp(32px, 4.2vw, 60px); /* 60px (Figma) from ~1430px wide */
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: 0.3px;
  overflow-wrap: break-word;
}

.fds-hero-title span { color: var(--fds-primary); }

.fds-hero-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: -0.3125px;
  color: var(--fds-text-muted);
}

.fds-hero-indigo, .fds-hero-blue, .fds-hero-sky, .fds-hero-violet, .fds-hero-teal { color: var(--fds-white); }
.fds-hero-indigo { background: var(--fds-indigo-600); }
.fds-hero-blue { background: var(--fds-blue-600); }
.fds-hero-sky { background: var(--fds-sky-500); }
.fds-hero-violet { background: var(--fds-violet-600); }
.fds-hero-teal { background: var(--fds-teal-500); } /* ours: student Independent revision */
.fds-hero-indigo .fds-hero-sub, .fds-hero-blue .fds-hero-sub,
.fds-hero-sky .fds-hero-sub, .fds-hero-violet .fds-hero-sub, .fds-hero-teal .fds-hero-sub { color: var(--fds-white); }
.fds-hero-indigo .fds-hero-title span, .fds-hero-blue .fds-hero-title span,
.fds-hero-sky .fds-hero-title span, .fds-hero-violet .fds-hero-title span, .fds-hero-teal .fds-hero-title span { color: inherit; }

/* Shorter section hero (ours): same look, 160px tall like the compact header, smaller title. */
.fds-hero-sm { min-height: 160px; padding: 32px 40px; }
.fds-hero-sm .fds-hero-title { font-size: clamp(30px, 3vw, 44px); }
.fds-hero-sm .fds-btn-hero { flex: none; padding: 14px 20px; }
/* Several hero buttons side by side (Question Bank: Import + Add Question). */
.fds-hero-actions { display: flex; flex: none; flex-wrap: wrap; gap: 12px; }

/* Selected item header (Figma 597:60148): back button, 30px title + badge, meta row. */
.fds-hero-compact { align-items: flex-start; justify-content: flex-start; min-height: 160px; box-shadow: var(--fds-shadow-card); }
.fds-hero-compact .fds-hero-title { font-size: 30px; letter-spacing: 0.15px; }
/* Figma 594:93075: 46x42 back button, 24px to the text; 48px title row, meta 8px below. */
.fds-hero-compact { gap: 24px; }
.fds-hero-compact .fds-hero-back { margin-top: 3px; }
.fds-hero-compact .fds-hero-heading { min-height: 48px; }

/* ---------- Tabs (Figma 594:159723) ----------
   .fds-tabs on a navy card (dark) or .fds-tabs-light on a page with a 2px grey bar.
   Each tab: icon + label + small count badge; .is-active = blue text/icon + 2px blue underline. */
.fds-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 206px)); /* Figma: 854px strip, four 206px slots, left-aligned */
  gap: 10px;
  padding: 24px;
  background: var(--fds-blue-950);
  border-radius: var(--fds-radius-xl);
  box-shadow: var(--fds-shadow-card);
}

.fds-tabs-light {
  display: flex;
  gap: 10px;
  border-bottom: 2px solid var(--fds-gray-200);
}

.fds-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  letter-spacing: 0.07px;
  text-decoration: none;
  white-space: nowrap;
}

.fds-tabs .fds-tab { color: var(--fds-gray-300); }
.fds-tabs .fds-tab .fds-icon { color: var(--fds-white); }
.fds-tabs .fds-tab:hover { color: var(--fds-white); }
.fds-tabs-light .fds-tab { flex: 1; margin-bottom: -2px; color: var(--fds-gray-800); }
.fds-tabs-light .fds-tab:hover { background: var(--fds-slate-50); color: var(--fds-gray-800); }

.fds-tab.is-active,
.fds-tab.is-active:hover,
.fds-tab.is-active .fds-icon { border-bottom-color: var(--fds-primary); color: var(--fds-primary); }
.fds-tabs .fds-tab.is-active { font-weight: 600; }

/* Inactive dark-tab counters are soft blue; active ones solid blue. */
.fds-tabs .fds-tab .fds-badge-sm { background: var(--fds-blue-100); color: var(--fds-blue-800); }
.fds-tabs .fds-tab.is-active .fds-badge-sm { background: var(--fds-primary); color: var(--fds-white); }

/* ---------- Switch (two options, e.g. Live / Archived) ---------- */
.fds-switch {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
}

.fds-switch a { color: var(--fds-gray-500); text-decoration: none; }
.fds-switch a.is-active { color: var(--fds-primary); }

.fds-switch-track {
  display: inline-flex;
  padding: 2px;
  background: var(--fds-gray-100);
  border: 1px solid var(--fds-gray-200);
  border-radius: var(--fds-radius-pill);
}

.fds-switch-track a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--fds-radius-pill);
}

.fds-switch-track a.is-active { background: var(--fds-white); box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15); }

/* ---------- Input variants (Figma Inputs 632:33026) ---------- */
.fds-input-wrap:hover { border-color: var(--fds-gray-300); }
.fds-input-wrap:focus-within { border-color: var(--fds-primary); }
.fds-input-wrap.is-invalid { border-color: var(--fds-red-500); }
.fds-input-wrap.is-valid { border-color: var(--fds-teal-500); }
.fds-input-wrap.is-disabled { background: var(--fds-slate-50); border-color: var(--fds-gray-100); color: var(--fds-gray-300); }
.fds-input:disabled { color: var(--fds-gray-300); cursor: not-allowed; }
.fds-input-sm .fds-input { padding: 10px 12px; }
.fds-input-lg .fds-input { padding: 22px 20px; }
/* Selects keep room on the right for the chevron at every size. */
.fds-input-sm .fds-select { padding: 10px 36px 10px 12px; background-position: right 12px center; }
.fds-input-lg .fds-select { padding: 22px 44px 22px 20px; background-position: right 20px center; }
.fds-input-pill { border-radius: var(--fds-radius-pill); }
.fds-input-light { background: var(--fds-gray-100); border-color: var(--fds-gray-100); }
.fds-input-underline { border-width: 0 0 1px; border-radius: 0; }
.fds-valid { margin: 0; font-size: 14px; font-weight: 500; color: var(--fds-teal-500); }

/* Leading/trailing icon inside an input. */
.fds-input-icon {
  display: flex;
  align-items: center;
  align-self: stretch;
  padding: 0 0 0 16px;
  color: var(--fds-gray-500);
}

.fds-input-icon + .fds-input { padding-left: 10px; }

/* Native select styled like an input (chevron drawn as a mask). */
.fds-select {
  flex: 1;
  min-width: 0;
  padding: 14px 40px 14px 16px;
  border: 0;
  outline: 0;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 16px center;
  -webkit-appearance: none;
  appearance: none;
  font-family: var(--fds-font-sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.075px;
  color: var(--fds-text-label);
  cursor: pointer;
}

/* ---------- Input groups (Figma 632:44924) ----------
   Inputs, add-ons and buttons joined with collapsed borders; only outer corners round. */
.fds-input-group { display: flex; align-items: stretch; }
.fds-input-group > * { margin-left: -1px; border-radius: 0; }
.fds-input-group > :first-child { margin-left: 0; border-top-left-radius: var(--fds-radius-sm); border-bottom-left-radius: var(--fds-radius-sm); }
.fds-input-group > :last-child { border-top-right-radius: var(--fds-radius-sm); border-bottom-right-radius: var(--fds-radius-sm); }
.fds-input-group > .fds-input-wrap { flex: 1; }
.fds-input-group > :focus-within { position: relative; z-index: 1; }

/* Add-on text ("http://", "Full name") inside an input, divided from the value. */
.fds-input-addon {
  display: flex;
  align-items: center;
  align-self: stretch;
  padding: 0 16px;
  background: var(--fds-slate-50);
  border-right: 1px solid var(--fds-gray-200);
  font-size: 15px;
  font-weight: 500;
  color: var(--fds-gray-500);
  white-space: nowrap;
}

.fds-input-group-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  background: var(--fds-slate-50);
  border-top: 1px solid var(--fds-gray-200);
  border-bottom: 1px solid var(--fds-gray-200);
  color: var(--fds-gray-500);
}

.fds-btn-white { background: var(--fds-white); border-color: var(--fds-gray-200); color: var(--fds-gray-800); box-shadow: var(--fds-shadow-2xs); }
.fds-btn-white:hover { background: var(--fds-gray-100); color: var(--fds-gray-800); }

/* ---------- Tables (Figma 609:11005) ---------- */
.fds-table-wrap {
  overflow: hidden;
  background: var(--fds-surface);
  border: 1px solid var(--fds-gray-200);
  border-radius: var(--fds-radius-xs);
  box-shadow: var(--fds-shadow-xs);
}

/* position: relative keeps absolutely placed labels (visually-hidden) inside the scroll box. */
.fds-table-scroll { position: relative; overflow-x: auto; }

.fds-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-family: var(--fds-font-sans);
}

.fds-table th {
  padding: 12px 20px;
  background: var(--fds-slate-50);
  border-top: 1px solid var(--fds-gray-200);
  border-bottom: 1px solid var(--fds-gray-200);
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.06px;
  text-align: left;
  text-transform: uppercase;
  color: var(--fds-gray-500);
  white-space: nowrap;
}

.fds-table td {
  padding: 12px 20px;
  border-bottom: 1px solid var(--fds-gray-200);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  letter-spacing: 0.07px;
  color: var(--fds-gray-800);
  vertical-align: middle;
}

.fds-table tbody tr:hover { background: var(--fds-slate-50); }
.fds-table tbody tr.is-selected { background: var(--fds-blue-50); }
.fds-table .is-muted { color: var(--fds-gray-500); }
.fds-table .is-truncate { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fds-table-actions { display: flex; align-items: center; gap: 20px; }

/* ---------- Pagination footer (Figma Footers 626:12916) ----------
   Compact "« [1] of N »" (.fds-pagination) or numbered with Previous/Next (.fds-pagination-full). */
.fds-card-footer {
  padding: 12px 16px;
  background: var(--fds-slate-50);
  border-radius: 0 0 var(--fds-radius-xs) var(--fds-radius-xs);
}

.fds-pagination {
  display: inline-flex;
  align-items: center;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  letter-spacing: 0.08px;
  color: var(--fds-gray-500);
}

.fds-pagination > * {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--fds-radius-sm);
  color: var(--fds-gray-500);
  text-decoration: none;
}

.fds-pagination a:hover { background: var(--fds-gray-100); color: var(--fds-gray-600); }
.fds-pagination .is-arrow { color: var(--fds-gray-600); }
.fds-pagination .is-current { padding: 0; background: var(--fds-gray-200); border-radius: var(--fds-radius-xs); }
.fds-pagination .is-disabled { color: var(--fds-gray-300); pointer-events: none; }
.fds-pagination-full { gap: 10px; }
.fds-pagination-full .is-step { gap: 8px; background: var(--fds-white); border: 1px solid var(--fds-gray-200); box-shadow: var(--fds-shadow-2xs); }
.fds-pagination-full .is-current { border-radius: var(--fds-radius-sm); }

/* ---------- Hero: back button and meta row for .fds-hero-compact (Figma 594:94417) ---------- */
.fds-hero-back {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 42px;
  border-radius: var(--fds-radius-sm);
  color: inherit;
}

.fds-hero-back:hover { background: rgba(255, 255, 255, 0.1); color: inherit; }
.fds-hero-back:focus-visible { outline: 0; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.35); }

.fds-hero-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.fds-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  margin: 8px 0 0;
  font-size: 16px;
  line-height: 24px;
}

.fds-hero-meta b { font-weight: 500; }
.fds-hero-meta > span + span::before { content: "|"; margin-right: 24px; }

/* ---------- Section header (Figma 594:93697 table header) ----------
   Grey bar above a table: title + description on the left, actions on the right. */
.fds-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 12px 20px;
  background: var(--fds-slate-50);
  border: 1px solid var(--fds-gray-200);
  border-radius: var(--fds-radius-xs);
}

.fds-section-title { margin: 0; font-size: 16px; line-height: 24px; font-weight: 400; color: var(--fds-gray-800); }
.fds-section-desc { margin: 4px 0 0; font-size: 14px; line-height: 20px; color: var(--fds-gray-500); }
.fds-section-actions { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---------- Empty state (Figma 701:74286) ---------- */
.fds-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  min-height: 220px;
  padding: 20px;
  background: var(--fds-white);
  border: 1px solid var(--fds-gray-200);
  border-radius: var(--fds-radius-md);
  box-shadow: var(--fds-shadow-2xs);
  text-align: center;
}

.fds-empty-state-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  background: var(--fds-gray-100);
  border-radius: var(--fds-radius-sm);
  color: var(--fds-gray-800);
}

.fds-empty-state p { margin: 0; font-size: 15px; font-weight: 500; color: var(--fds-gray-300); }

/* ---------- Textarea (Figma _input-small, multi-line) ---------- */
.fds-textarea {
  display: block;
  width: 100%;
  min-height: 96px;
  padding: 14px 12px;
  background: var(--fds-white);
  border: 1px solid var(--fds-gray-200);
  border-radius: var(--fds-radius-sm);
  font-family: var(--fds-font-sans);
  font-size: 15px;
  line-height: 1.5;
  font-weight: 500;
  color: var(--fds-gray-800);
  resize: vertical;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.fds-textarea:hover { border-color: var(--fds-gray-300); }
.fds-textarea:focus { outline: 0; border-color: var(--fds-primary); box-shadow: var(--fds-focus-ring); }
.fds-textarea.is-invalid { border-color: var(--fds-red-500); }

/* ---------- Accordion (Figma answer / question cards, flow 701:73156) ----------
   <details class="fds-accordion"><summary>...</summary><div class="fds-accordion-body">. */
.fds-accordion {
  background: var(--fds-white);
  border: 1px solid var(--fds-gray-200);
  border-radius: var(--fds-radius-md);
  box-shadow: var(--fds-shadow-xs);
}

.fds-accordion > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  list-style: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: var(--fds-gray-800);
}

.fds-accordion > summary::-webkit-details-marker { display: none; }

.fds-accordion > summary::after {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  margin-left: auto;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.15s;
}

.fds-accordion[open] > summary::after { transform: rotate(180deg); }
.fds-accordion > summary:focus-visible { outline: 0; border-radius: var(--fds-radius-md); box-shadow: var(--fds-focus-ring); }

.fds-accordion-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 12px;
  border-top: 1px solid var(--fds-gray-200);
  font-size: 14px;
  line-height: 20px;
  color: var(--fds-gray-600);
}

/* ---------- Overlays (Figma flow 701:70874) ----------
   Native <dialog> opened with showModal(): .fds-drawer (right panel, 544px), .fds-sheet
   (large panel from the top bar), .fds-modal (confirm). Inside: head / body / foot. */
.fds-drawer, .fds-sheet, .fds-modal {
  padding: 0;
  border: 0;
  background: var(--fds-white);
  font-family: var(--fds-font-sans);
  color: var(--fds-gray-800);
}

.fds-drawer::backdrop, .fds-sheet::backdrop, .fds-modal::backdrop, .fds-dialog::backdrop {
  background: rgba(17, 24, 39, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.fds-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(544px, 100vw);
  max-width: 100vw;
  height: 100dvh;
  max-height: none;
  margin: 0;
  box-shadow: var(--fds-shadow-lg);
}

.fds-sheet {
  position: fixed;
  inset: 72px 0 0 auto;
  width: min(1160px, 100vw);
  max-width: 100vw;
  height: calc(100dvh - 72px);
  max-height: none;
  margin: 0;
  border-radius: var(--fds-radius-2xl) var(--fds-radius-2xl) 0 0;
}

.fds-drawer[open], .fds-sheet[open] { display: flex; flex-direction: column; }

.fds-overlay-panel { display: flex; flex-direction: column; flex: 1; min-height: 0; }

.fds-overlay-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border-bottom: 1px solid var(--fds-gray-200);
}

.fds-overlay-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; }
.fds-overlay-title { flex: 1; margin: 0; font-size: 20px; line-height: 28px; font-weight: 600; color: var(--fds-gray-800); }
.fds-overlay-actions { display: flex; align-items: center; gap: 16px; }

.fds-overlay-note {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--fds-gray-500);
}

.fds-overlay-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 24px;
  min-height: 0;
  padding: 32px 40px;
  overflow-y: auto;
}

.fds-overlay-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 24px;
  background: var(--fds-slate-50);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.fds-overlay-foot .fds-error { margin-right: auto; }

.fds-modal {
  width: min(450px, calc(100vw - 32px));
  padding: 40px;
  border-radius: var(--fds-radius-2xl);
  box-shadow: 0 9px 7px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.fds-modal[open] { display: flex; flex-direction: column; align-items: center; gap: 20px; }

.fds-modal-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  background: var(--fds-yellow-500);
  border-radius: var(--fds-radius-pill);
  color: var(--fds-white);
}

/* Figma 701:72989: icon -> message 20px, title -> text 10px, message -> actions 40px. */
.fds-modal-title { margin: 0; font-size: 20px; line-height: 24px; font-weight: 600; letter-spacing: 0.1px; color: var(--fds-gray-800); }
.fds-modal-text { margin: 10px 0 0; font-size: 16px; line-height: 24px; font-weight: 500; letter-spacing: 0.08px; color: var(--fds-gray-500); }
.fds-modal-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; margin-top: 20px; }

/* ---------- Dialog: step modal with header, scrolling body and footer (Figma Create New Quiz 95:7956) ----------
   Centred header (optional back / close in the corners, icon badge, title, description), a body
   that scrolls, and an .fds-overlay-foot. Native <dialog> opened with showModal(). */
.fds-dialog {
  width: min(490px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: 0;
  border-radius: var(--fds-radius-2xl);
  background: var(--fds-white);
  box-shadow: var(--fds-shadow-xl);
  font-family: var(--fds-font-sans);
  color: var(--fds-gray-800);
}

.fds-dialog[open] { display: flex; flex-direction: column; }
.fds-dialog-wide { width: min(720px, calc(100vw - 32px)); }

.fds-dialog-head {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 24px 56px 20px;
  border-bottom: 1px solid var(--fds-gray-200);
  text-align: center;
}

.fds-dialog-head .fds-icon-badge { margin-bottom: 6px; }
.fds-dialog-back, .fds-dialog-close { position: absolute; top: 12px; }
.fds-dialog-back { left: 12px; }
.fds-dialog-close { right: 12px; }
.fds-dialog-title { margin: 0; font-size: 18px; line-height: 28px; font-weight: 600; color: var(--fds-gray-800); }
.fds-dialog-desc { margin: 0; font-size: 14px; line-height: 20px; color: var(--fds-gray-500); }

.fds-dialog-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  padding: 24px;
  overflow-y: auto;
}

/* ---------- Combobox: searchable multi-select (Figma Assign to Class "Select Class..." 538:112111) ----------
   An input-styled control holding the picked values as chips plus a search input and a chevron;
   the menu floats over the content below (position: fixed, placed by the script under the field,
   or above it when there is no room), so opening it never changes the page or dialog height and a
   scrolling dialog body can't clip it: optional filter buttons, an actions row, then a listbox. Each option keeps a real (hidden)
   checkbox, so the form posts exactly what a checkbox list would. Behaviour: static/quizzes/assign.js. */
.fds-combobox { display: flex; flex-direction: column; gap: 10px; }

.fds-combobox-control { align-items: stretch; flex-wrap: nowrap; cursor: text; }
.fds-combobox-values {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 6px 12px;
}
.fds-combobox-values .fds-chip { gap: 4px; padding-right: 4px; }
.fds-combobox-values .fds-chip button {
  display: inline-flex;
  padding: 2px;
  border: 0;
  border-radius: var(--fds-radius-pill);
  background: none;
  color: inherit;
  cursor: pointer;
}
.fds-combobox-values .fds-chip button:hover { background: var(--fds-blue-200); }
.fds-combobox-input { flex: 1 1 120px; min-width: 120px; padding: 8px 4px; }

.fds-combobox-toggle {
  display: flex;
  align-items: center;
  flex: none;
  padding: 0 16px;
  border: 0;
  border-left: 1px solid var(--fds-gray-200);
  background: none;
  color: var(--fds-gray-500);
  cursor: pointer;
}
.fds-combobox-toggle .fds-icon { transition: transform 0.15s; }
.fds-combobox.is-open .fds-combobox-toggle .fds-icon { transform: rotate(180deg); }

.fds-combobox-menu {
  position: fixed;
  z-index: 20;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 8px;
  background: var(--fds-white);
  border: 1px solid var(--fds-gray-200);
  border-radius: var(--fds-radius-lg);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1); /* Figma Box Shadow/lg */
}
.fds-combobox-menu[hidden] { display: none; }

.fds-combobox-filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 4px 8px; }
.fds-combobox-filter {
  padding: 3px 10px;
  border: 1px solid var(--fds-gray-200);
  border-radius: var(--fds-radius-pill);
  background: var(--fds-white);
  font: inherit;
  font-size: 12px;
  line-height: 18px;
  font-weight: 500;
  color: var(--fds-gray-600);
  cursor: pointer;
}
.fds-combobox-filter:hover { background: var(--fds-gray-100); }
.fds-combobox-filter.is-active { background: var(--fds-blue-50); border-color: var(--fds-blue-200); color: var(--fds-blue-700); }

.fds-combobox-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 12px 8px;
  border-bottom: 1px solid var(--fds-gray-200);
  margin-bottom: 4px;
  font-size: 12px;
  line-height: 16px;
  color: var(--fds-gray-500);
}
.fds-combobox-actions .fds-link { padding: 0; border: 0; background: none; font-size: 12px; cursor: pointer; }

.fds-combobox-list { display: flex; flex: 1; flex-direction: column; min-height: 0; max-height: 240px; overflow-y: auto; }
.fds-combobox-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--fds-radius-sm);
  cursor: pointer;
}
.fds-combobox-option[hidden] { display: none; }
.fds-combobox-option:hover, .fds-combobox-option.is-current { background: var(--fds-gray-100); }
.fds-combobox-option.is-disabled { cursor: not-allowed; opacity: 0.6; }
.fds-combobox-option.is-disabled:hover { background: none; }
.fds-combobox-check { display: flex; flex: none; width: 16px; color: var(--fds-primary); visibility: hidden; }
.fds-combobox-option[aria-selected="true"] .fds-combobox-check { visibility: visible; }
.fds-combobox-text { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.fds-combobox-label { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--fds-gray-800); }
.fds-combobox-option[aria-selected="true"] .fds-combobox-label { font-weight: 600; }
.fds-combobox-meta { font-size: 12px; line-height: 16px; color: var(--fds-gray-500); }
.fds-combobox-empty { margin: 0; padding: 16px 12px; text-align: center; font-size: 14px; color: var(--fds-gray-500); }

/* ---------- Form layout: panels, boxes, answer options (Figma Create New Quiz builder 225:17044) ----------
   fds-panel: grey group of fields (quiz details). fds-box: bordered group (one question, its
   answers). fds-option: an input row with a lettered badge and a "correct" radio. fds-file: a native
   file input; fds-file-current: the file already chosen, with a Remove link. fds-accordion-hint:
   grey text after an accordion summary ("sub-category, image"). fds-link-btn: an fds-link on a
   <button>. */
.fds-panel { display: flex; flex-direction: column; gap: 16px; padding: 16px; background: var(--fds-gray-100); border-radius: var(--fds-radius-md); }
.fds-box { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--fds-gray-200); border-radius: var(--fds-radius-md); }
.fds-box .fds-textarea { width: 100%; }
.fds-option { gap: 10px; padding-left: 10px; }
.fds-option input[type="radio"] { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--fds-primary); }
.fds-option .fds-input { padding-left: 2px; }
.fds-option-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 24px;
  height: 24px;
  background: var(--fds-blue-100);
  border-radius: var(--fds-radius-pill);
  font-size: 11px;
  font-weight: 600;
  color: var(--fds-blue-700);
}
.fds-file { font-size: 14px; }
.fds-file-current { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--fds-gray-800); }
.fds-accordion-hint { margin-left: 6px; font-weight: 400; color: var(--fds-gray-500); }
.fds-link-btn { padding: 0; border: 0; background: none; cursor: pointer; }

/* As a page: a dialog's panel, centred (the assign and add-question pages, which the Manage
   Quizzes and Question Bank modals also load). */
.fds-dialog-page { display: flex; justify-content: center; margin: 16px auto 0; font-family: var(--fds-font-sans); }
.fds-dialog-panel {
  display: flex;
  flex-direction: column;
  width: min(720px, 100%);
  background: var(--fds-white);
  border: 1px solid var(--fds-slate-300);
  border-radius: var(--fds-radius-2xl);
  box-shadow: var(--fds-shadow-md);
  overflow: hidden;
}
.fds-dialog-panel > form, dialog.fds-dialog > form { display: contents; }

/* ---------- Choice cards (Figma Choose Quiz Type 221:13608) ----------
   A big button per option: coloured icon, title, description, arrow. -stack = icon over centred
   text (the "Next steps" tiles). */
.fds-choice {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 16px 20px;
  background: var(--fds-white);
  border: 1px solid var(--fds-gray-200);
  border-radius: var(--fds-radius-md);
  font: inherit;
  text-align: left;
  color: var(--fds-gray-800);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.fds-choice:hover { border-color: var(--fds-gray-300); box-shadow: var(--fds-shadow-sm); }
.fds-choice:focus-visible { outline: 2px solid var(--fds-primary); outline-offset: 2px; }
.fds-choice > .fds-icon:last-child { flex: none; color: var(--fds-gray-800); }

.fds-choice-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  align-self: flex-start;
  width: 32px;
  height: 32px;
  border-radius: var(--fds-radius-pill);
  background: var(--fds-primary);
  color: var(--fds-white);
}

.fds-choice-icon-red { background: var(--fds-red-500); }
.fds-choice-icon-teal { background: var(--fds-teal-500); }
.fds-choice-icon-yellow { background: var(--fds-yellow-500); }
.fds-choice-icon-outline { background: var(--fds-white); border: 1px solid var(--fds-primary); color: var(--fds-primary); }

.fds-choice-text { display: flex; flex: 1; flex-direction: column; gap: 4px; min-width: 0; }
.fds-choice-title { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--fds-gray-800); }
.fds-choice-desc { font-size: 13px; line-height: 18px; font-weight: 400; color: var(--fds-gray-500); }

.fds-choice-stack { flex-direction: column; justify-content: flex-start; gap: 10px; padding: 16px; text-align: center; }
.fds-choice-stack .fds-choice-icon { align-self: center; }
.fds-choice-stack.is-primary { border-color: var(--fds-primary); }

/* ---------- Toasts (Figma Toasts / Alerts 594:128333, flow 701:72145) ----------
   teacherbase renders every Django message as one; they stack bottom-left of the content
   (the shell offsets the stack past the open sidebar). Tone by message level:
   success = teal (workflow complete), warning = yellow (blocked), error = red (failed),
   info = blue (action confirmed; the default). */
.fds-toasts {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 1080;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(475px, calc(100vw - 48px));
}

.fds-toast {
  --toast-bg: var(--fds-blue-600);
  --toast-text: var(--fds-blue-200);
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 16px 52px 16px 16px;
  background: var(--toast-bg);
  border-radius: var(--fds-radius-lg);
  box-shadow: var(--fds-shadow-md);
  font-family: var(--fds-font-sans);
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0.08px;
  color: var(--toast-text);
  overflow-wrap: anywhere;
}

.fds-toast-success { --toast-bg: var(--fds-teal-500); --toast-text: var(--fds-teal-100); }
.fds-toast-warning { --toast-bg: var(--fds-yellow-500); --toast-text: var(--fds-yellow-100); }
.fds-toast-error { --toast-bg: var(--fds-red-500); --toast-text: var(--fds-red-100); }

.fds-toast-icon {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--fds-radius-pill);
  color: var(--fds-white);
}

.fds-toast-body { flex: 1; min-width: 0; margin: 0; padding-top: 7px; }
.fds-toast-title { display: block; font-size: 18px; line-height: 24px; font-weight: 600; letter-spacing: 0.09px; color: var(--fds-white); }
.fds-toast-title:not(:only-child) { margin-bottom: 4px; }
.fds-toast b { font-weight: 600; }
.fds-toast i, .fds-toast em { font-weight: 600; }

.fds-toast-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  padding: 2px;
  border: 0;
  border-radius: var(--fds-radius-xs);
  background: transparent;
  color: var(--toast-text);
  cursor: pointer;
}

.fds-toast-close:hover { color: var(--fds-white); }
.fds-toast-close:focus-visible { outline: 2px solid var(--fds-white); outline-offset: 1px; }

/* ---------- Responsive ---------- */
/* ---------- Data table pattern (Figma proposal "Data tables - Quizzes" 155760:938) ----------
   One list pattern for Manage Quizzes (and later Assignments, Question Bank, Add Questions):
   page header, a table card with light tabs, toolbar (search + filter selects), filter chips,
   a bulk-action bar, a sortable .fds-table, row menus and a pagination footer. */

/* Page header: title, description, actions on the right. */
.fds-page-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.fds-page-head-text { flex: 1 1 320px; min-width: 0; }
.fds-page-title { margin: 0; font-size: 24px; line-height: 32px; font-weight: 600; color: var(--fds-slate-900); }
.fds-page-desc { margin: 4px 0 0; font-size: 14px; line-height: 20px; color: var(--fds-slate-500); }

/* Light tabs that size to their label, left-aligned (the list card's view tabs). */
.fds-tabs-fit { gap: 12px; }
.fds-tabs-light.fds-tabs-fit .fds-tab { flex: none; }

/* Filter select: "Key stage: KS3" prefix and a blue border while a value is chosen. */
.fds-input-prefix {
  display: flex;
  align-items: center;
  align-self: stretch;
  padding-left: 16px;
  font-size: 15px;
  font-weight: 400;
  color: var(--fds-gray-500);
  white-space: nowrap;
  pointer-events: none;
}

.fds-input-sm .fds-input-prefix { padding-left: 12px; }
.fds-input-prefix + .fds-select { padding-left: 6px; }
.fds-input-wrap.is-active { border-color: var(--fds-primary); }

/* Keyboard shortcut hint inside an input ("/" focuses search). */
.fds-kbd {
  flex: none;
  margin-right: 12px;
  padding: 1px 6px;
  border: 1px solid var(--fds-slate-200);
  border-radius: 4px;
  background: var(--fds-white);
  box-shadow: none;
  font-family: var(--fds-font-sans);
  font-size: 11px;
  line-height: 16px;
  color: var(--fds-slate-400);
}

.fds-input-wrap:focus-within .fds-kbd { display: none; }

/* Active filters as removable chips: "2 filters · [Key stage: KS3 x] [Subject: Maths x] Clear all". */
.fds-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  line-height: 20px;
  color: var(--fds-slate-500);
}

.fds-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  background: var(--fds-blue-50);
  border-radius: var(--fds-radius-pill);
  font-size: 12px;
  line-height: 20px;
  font-weight: 500;
  color: var(--fds-blue-700);
  text-decoration: none;
}

.fds-chip:hover { background: var(--fds-blue-100); color: var(--fds-blue-800); }
.fds-chip .fds-icon { opacity: 0.7; }
.fds-chips .fds-link { font-size: 13px; }

/* Bulk-action bar above a table while rows are selected. */
.fds-bulk-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 20px;
  background: var(--fds-blue-50);
  border-top: 1px solid var(--fds-blue-200);
  border-bottom: 1px solid var(--fds-blue-200);
}

.fds-bulk-bar[hidden] { display: none; }
.fds-bulk-count { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--fds-slate-900); }
.fds-bulk-bar .fds-link { margin-left: auto; padding: 0; border: 0; background: none; font-size: 13px; cursor: pointer; }

/* While design/datatable.js loads a new page of results. */
[data-dt-card][aria-busy="true"] [data-dt-results] { opacity: 0.6; transition: opacity 0.15s; }

/* Compact table (the data table pattern): 12px cells, 20px at the outer edges, so eight
   columns fit the 1160px content area. */
.fds-table-compact th, .fds-table-compact td { padding: 12px; }
.fds-table-compact th:first-child, .fds-table-compact td:first-child { padding-left: 20px; }
.fds-table-compact th:last-child, .fds-table-compact td:last-child { padding-right: 20px; }

/* Table parts: checkbox column, sortable header, second line in a cell, row states. */
.fds-table .fds-table-check { width: 1%; padding-right: 4px; }
.fds-table .fds-table-check .fds-check { gap: 0; }
.fds-table .fds-table-check input:disabled { cursor: not-allowed; opacity: 0.4; }

.fds-table-sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  text-decoration: none;
}

.fds-table-sort .fds-icon { color: var(--fds-gray-300); transition: transform 0.15s; }
.fds-table-sort:hover { color: var(--fds-gray-800); }
.fds-table-sort.is-active { color: var(--fds-gray-800); }
.fds-table-sort.is-active .fds-icon { color: var(--fds-gray-800); }
.fds-table-sort.is-asc .fds-icon { transform: rotate(180deg); }

.fds-table-meta {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 400;
  color: var(--fds-gray-500);
}

.fds-table tbody tr.is-dim > td:not(.fds-table-check):not(:last-child) { color: var(--fds-gray-500); }

/* Initials avatar (Preline _avatar soft blue), 28px; -gray for Global / system. */
.fds-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 28px;
  height: 28px;
  background: var(--fds-blue-100);
  border-radius: var(--fds-radius-pill);
  font-size: 11px;
  line-height: 1;
  font-weight: 600;
  color: var(--fds-blue-700);
}

.fds-avatar-gray { background: var(--fds-gray-100); color: var(--fds-gray-600); }

/* Row menu: a popover list opened from an fds-icon-btn ("More"). Native [popover] so the
   table's scroll box never clips it; static/design/menu.js places it under its button. */
.fds-menu {
  position: fixed;
  inset: auto;
  width: 220px;
  margin: 0;
  padding: 6px 0;
  background: var(--fds-white);
  border: 1px solid var(--fds-gray-200);
  border-radius: var(--fds-radius-sm);
  box-shadow: var(--fds-shadow-xl);
  font-family: var(--fds-font-sans);
}

.fds-menu form { margin: 0; }

.fds-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 14px;
  border: 0;
  background: none;
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  text-align: left;
  text-decoration: none;
  color: var(--fds-gray-800);
  cursor: pointer;
}

.fds-menu-item .fds-icon { color: var(--fds-gray-500); }
.fds-menu-item:hover, .fds-menu-item:focus-visible { background: var(--fds-slate-50); color: var(--fds-gray-800); outline: 0; }
.fds-menu-item.is-danger, .fds-menu-item.is-danger .fds-icon { color: var(--fds-red-600); }
.fds-menu-item.is-danger:hover { background: var(--fds-red-50); color: var(--fds-red-600); }
.fds-menu-divider { height: 1px; margin: 6px 0; background: var(--fds-gray-200); }

/* Menu with a described item per choice ("Add question" -> type): icon tile, title, one-line help. */
.fds-menu-wide { width: 300px; }
.fds-menu-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  align-self: flex-start;
  width: 32px;
  height: 32px;
  background: var(--fds-slate-100);
  border-radius: var(--fds-radius-sm);
}
.fds-menu-item-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fds-menu-item-desc { font-size: 12px; line-height: 16px; color: var(--fds-gray-500); }
.fds-menu-wide .fds-menu-item { gap: 12px; padding: 10px 14px; }
.fds-menu-note { margin: 0; padding: 7px 14px; font-size: 13px; line-height: 18px; color: var(--fds-gray-500); }

@media (max-width: 1279.98px) {
  .fds-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1023.98px) {
  .fds-help { display: none; }
  .fds-hint-inline { display: block; }
  .fds-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767.98px) {
  /* Stacked heroes size to their content; the 282/160px desktop heights leave an empty block. */
  .fds-hero, .fds-hero-compact { flex-direction: column; align-items: flex-start; justify-content: flex-start; min-height: 0; }
}

@media (max-width: 639.98px) {
  .fds-card-feed { padding: 20px 16px; }
  .fds-dl > div { grid-template-columns: 1fr; }
  .fds-stats { grid-template-columns: 1fr; }
  .fds-toasts { left: 16px; bottom: 16px; width: calc(100vw - 32px); }
  .fds-tabs-light { overflow-x: auto; }
  .fds-hero-meta { flex-direction: column; }
  .fds-hero-meta > span + span::before { content: none; }
  .fds-overlay-head { padding: 16px; }
  .fds-overlay-body { padding: 24px 16px; }
  .fds-overlay-foot { padding: 12px 16px; }
  .fds-sheet { inset: 16px 0 0 0; height: calc(100dvh - 16px); }
  .fds-modal { padding: 24px; }
  .fds-dialog-head { padding: 20px 52px 16px; }
  .fds-dialog-body { padding: 16px; }
  .fds-hero { padding: 24px; }
  .fds-tabs { grid-template-columns: 1fr; padding: 16px; }
  .fds-scroll-item { gap: 16px; padding: 16px; }
  .fds-scroll-item > .fds-icon-tile { display: none; }
  .fds-scroll-head { flex-direction: column; align-items: stretch; }
}

/* ---------- Drop area (Figma "Upload bubble sheets" 155829:1232) ----------
   A <label> around a hidden file input: slate-50 box with a 2px dashed blue-200 border, a
   blue-100 circle with a blue-700 icon, title, hint and an outline-gray "Choose files" button
   look. Pages add the drag-and-drop behaviour (is-dragover, is-busy). */
.fds-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px;
  border: 2px dashed var(--fds-blue-200);
  border-radius: var(--fds-radius-lg);
  background: var(--fds-slate-50);
  text-align: center;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
/* Hover and drag-over are ours (Figma draws the resting state only). */
.fds-dropzone:hover { border-color: var(--fds-blue-400); }
.fds-dropzone.is-dragover { background: var(--fds-blue-50); border-color: var(--fds-primary); }
.fds-dropzone:focus-within { outline: 2px solid var(--fds-primary); outline-offset: 2px; }
.fds-dropzone-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--fds-radius-pill);
  background: var(--fds-blue-100);
  color: var(--fds-blue-700);
}
.fds-dropzone-title { font-size: 16px; line-height: normal; font-weight: 600; color: var(--fds-slate-900); }
.fds-dropzone-desc { font-size: 13px; line-height: normal; font-weight: 400; color: var(--fds-slate-500); }
.fds-dropzone .fds-btn { pointer-events: none; }
.fds-dropzone.is-busy { cursor: progress; }
.fds-dropzone.is-busy .fds-dropzone-icon { animation: fds-pulse 1.2s ease-in-out infinite; }
.fds-dropzone.is-busy .fds-btn { visibility: hidden; }
.fds-dropzone.is-disabled { cursor: not-allowed; opacity: 0.55; }
.fds-dropzone.is-disabled:hover { border-color: var(--fds-blue-200); }
@keyframes fds-pulse { 50% { opacity: 0.45; } }

@media (prefers-reduced-motion: reduce) {
  .fds-btn, .fds-input-wrap, .fds-help::after, .fds-help::before, .fds-table-sort .fds-icon, .fds-choice, .fds-combobox-toggle .fds-icon, .fds-dropzone { transition: none; }
  .fds-dropzone.is-busy .fds-dropzone-icon { animation: none; }
}
