/* App / marketing / teacher-resource / pupil styles. Load after styles.css (shared). */

body.page-jobs-board .job-image-attachment-host {
  border-bottom: var(--border-subtle);
  background: rgb(0 0 0 / 12%);
}

body.page-jobs-board .jobs-board-output-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

body.page-jobs-board .jobs-board-output-image {
  display: block;
  max-width: 100%;
  max-height: 120px;
  border-radius: var(--radius-control);
  object-fit: contain;
}

body.page-pop-pal-prompts .pop-pal-prompts-image-host,
body.page-group-checklist .pop-pal-prompts-image-host {
  margin-top: 8px;
}

body.page-pop-pal-prompts .pop-pal-prompts-prompt-image-host,
body.page-group-checklist .pop-pal-prompts-prompt-image-host {
  width: auto;
}

body.page-class-schedule .class-schedule-image-host {
  margin-top: 4px;
}

body.page-class-schedule .class-schedule-event,
body.page-class-schedule .class-schedule-display-event {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  height: 100%;
}

body.page-class-schedule .class-schedule-event-image,
body.page-class-schedule .class-schedule-display-event-image {
  display: block;
  max-width: 100%;
  max-height: 96px;
  margin-top: auto;
  border-radius: var(--radius-control);
  object-fit: contain;
}

body.page-teacher-resources .teacher-resources-intro {
  margin: 8px 0 0;
  font-size: var(--font-size-resource-page-intro);
  font-weight: 600;
  line-height: var(--line-height-body);
  text-align: center;
  opacity: 0.85;
}

body.page-teacher-resources .teacher-resources-body {
  margin: 16px 0 0;
  font-size: var(--font-size-body);
  font-weight: 600;
  line-height: var(--line-height-body);
  opacity: 0.92;
}

body.page-teacher-resources .teacher-resources-body-heart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: -0.2em;
  width: 1.15em;
  height: 1.15em;
  color: rgb(224 49 49 / 45%);
}

body.page-teacher-resources .teacher-resources-body-heart svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

body.page-teacher-resources #toolbar-form-message:empty {
  display: none;
}

body.page-teacher-resources #toolbar-form-message:not(:empty) {
  margin: 12px 0 0;
}

body.page-teacher-resources .resource-card {
  position: relative;
  padding-right: 48px;
}

body.page-teacher-resources .resource-card-favourite {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: rgb(255 255 255 / 70%);
  cursor: pointer;
}

body.page-teacher-resources .resource-card-favourite:hover,
body.page-teacher-resources .resource-card-favourite:focus-visible {
  color: #fff;
  background: rgb(255 255 255 / 12%);
  outline: none;
}

body.page-teacher-resources .resource-card-favourite:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

body.page-teacher-resources .resource-card-favourite-icon {
  display: block;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.page-teacher-resources .resource-card-favourite.is-selected {
  color: rgb(224 49 49 / 45%);
}

body.page-teacher-resources .resource-card-favourite.is-selected .resource-card-favourite-icon {
  fill: currentColor;
  stroke: currentColor;
}

/* Pupil access codes page */

body.page-pupil-codes .pupil-codes-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: min(100%, var(--panel-max-wide));
  max-height: none;
}

body.page-pupil-codes .pupil-codes-toolbar {
  flex: 0 0 auto;
}

body.page-pupil-codes .pupil-codes-toolbar h1 {
  margin: 0 0 8px;
  text-align: center;
}

body.page-pupil-codes .pupil-codes-toolbar .pupil-codes-page-intro {
  margin: 0 0 14px;
  font-size: var(--font-size-resource-page-intro);
  font-weight: 600;
  line-height: var(--line-height-body);
  text-align: center;
  opacity: 0.85;
}

body.page-pupil-codes .pupil-codes-toolbar .pupil-codes-body {
  margin: 0 0 20px;
  font-size: var(--font-size-body);
  font-weight: 600;
  line-height: var(--line-height-body);
  text-align: center;
  opacity: 0.92;
}

body.page-pupil-codes .pupil-codes-toolbar .pupil-codes-body p {
  margin: 0;
}

body.page-pupil-codes .pupil-codes-toolbar .pupil-codes-sample-note {
  margin: 10px 0 0;
  padding: 0;
  background: none;
  font-size: inherit;
  font-weight: inherit;
  font-style: italic;
  line-height: inherit;
  text-align: inherit;
  opacity: inherit;
}

body.page-pupil-codes .pupil-codes-generate {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 0 0 4px;
}

body.page-pupil-codes .pupil-codes-generate[hidden] {
  display: none;
}

body.page-pupil-codes .pupil-codes-card > .form-message:empty,
body.page-pupil-codes .pupil-codes-card > .pupil-codes-status:empty {
  display: none;
}

body.page-pupil-codes .pupil-codes-card > .form-message:not(:empty),
body.page-pupil-codes .pupil-codes-card > .pupil-codes-status:not([hidden]) {
  margin: 12px 0 0;
}

body.page-pupil-codes .pupil-codes-body a,
body.page-pupil-codes .pupil-codes-login-url {
  color: var(--color-cauldron-green);
  font-weight: 700;
  word-break: break-all;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

body.page-pupil-codes .pupil-codes-login-url:hover,
body.page-pupil-codes .pupil-codes-login-url:focus-visible {
  color: var(--color-accent-hover);
}

body.page-pupil-codes .pupil-codes-status {
  text-align: center;
  opacity: 0.85;
}

body.page-pupil-codes #codes-generated-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 18px;
}

body.page-pupil-codes #codes-generated-content[hidden] {
  display: none !important;
}

body.page-pupil-codes #pupil-codes-share-guide {
  margin: 0;
  font-size: var(--font-size-body);
  font-weight: 600;
  line-height: var(--line-height-body);
  text-align: center;
  opacity: 0.92;
}

body.page-pupil-codes #pupil-codes-share-guide p {
  margin: 0;
}

body.page-pupil-codes .pupil-codes-section {
  margin: 0 0 16px;
  padding: 16px 18px 18px;
  border: none;
  border-radius: var(--radius-card);
  background: var(--panel-nested-fill);
  scroll-margin-top: calc(var(--site-header-height) + 12px);
}

body.page-pupil-codes .pupil-codes-section:last-child {
  margin-bottom: 0;
}

body.page-pupil-codes .expandable-card-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin: 0 0 16px;
}

body.page-pupil-codes .expandable-card-heading > :is(h1, h2) {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--font-size-resource-section);
  font-weight: 700;
  line-height: var(--line-height-tight);
}

body.page-pupil-codes .expandable-card-teaser {
  margin: 0 0 16px;
  font-size: var(--font-size-body);
  font-weight: 600;
  line-height: var(--line-height-body);
  opacity: 0.92;
}

body.page-pupil-codes .expandable-card-teaser[hidden] {
  display: none;
}

body.page-pupil-codes .expandable-card-body {
  margin: 0;
}

body.page-pupil-codes .expandable-card-body[hidden] {
  display: none;
}

body.page-pupil-codes .expandable-card-toggle.continue-button {
  width: auto;
  flex: 0 0 auto;
  padding: 8px 18px;
  white-space: nowrap;
}

body.page-pupil-codes [data-expandable-card].is-collapsed .expandable-card-heading {
  margin-bottom: 12px;
}

body.page-pupil-codes .pupil-codes-share-intro {
  margin: 0 0 14px;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: 1.45;
  opacity: 0.9;
}

body.page-pupil-codes .pupil-codes-share-template-field {
  margin: 0 0 16px;
  text-align: left;
}

body.page-pupil-codes .pupil-codes-share-template-field .section-hint {
  margin: 0 0 8px;
}

body.page-pupil-codes .pupil-codes-share-template-field code {
  font-size: 0.92em;
}

body.page-pupil-codes .pupil-codes-share-template-field textarea {
  display: block;
  width: 100%;
  min-height: 9.5rem;
  max-height: 16rem;
  box-sizing: border-box;
  resize: vertical;
  font-family: inherit;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: 1.4;
}

body.page-pupil-codes .pupil-codes-share-action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  margin: 0 0 16px;
}

body.page-pupil-codes .pupil-codes-share-action:last-child {
  margin-bottom: 0;
}

body.page-pupil-codes .pupil-codes-share-action .continue-button {
  width: auto;
  min-width: min(100%, 16rem);
  min-height: 3rem;
  padding-inline: 16px;
  font-size: var(--font-size-small);
  white-space: normal;
  text-wrap: balance;
}

body.page-pupil-codes .pupil-codes-share-action-hint {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.35;
  opacity: 0.78;
  text-align: left;
}

body.page-pupil-codes .pupil-codes-per-page-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin: 0;
  font-size: var(--font-size-small);
  font-weight: 700;
}

body.page-pupil-codes .pupil-codes-per-page-inline select {
  width: auto;
  min-width: 3.5rem;
  margin: 0;
  padding: 6px 10px;
}

body.page-pupil-codes .pupil-codes-workspace {
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

body.page-pupil-codes .pupil-codes-workspace-heading {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.2;
}

body.page-pupil-codes .pupil-codes-layout {
  --pupil-codes-detail-min-height: 20rem;
  display: grid;
  grid-template-columns: minmax(11rem, 13.5rem) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

body.page-pupil-codes .pupil-codes-list-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: var(--pupil-codes-detail-min-height);
  max-height: min(28rem, 60vh);
}

body.page-pupil-codes .pupil-codes-list-heading {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 700;
  flex: 0 0 auto;
}

body.page-pupil-codes .pupil-codes-name-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  overflow: auto;
}

body.page-pupil-codes .pupil-codes-name-button {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border: 2px solid rgb(255 255 255 / 45%);
  border-radius: var(--radius-pill);
  background: rgb(var(--panel-tint-purple) / var(--panel-op-mid));
  color: inherit;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

body.page-pupil-codes .pupil-codes-name-button:hover,
body.page-pupil-codes .pupil-codes-name-button:focus-visible {
  background: rgb(var(--panel-tint-purple) / var(--panel-op-mid));
  outline: none;
}

body.page-pupil-codes .pupil-codes-name-button.is-selected {
  border-color: var(--group-color-4);
  background: var(--group-color-4);
  color: var(--color-text);
}

body.page-pupil-codes .pupil-codes-name-button.is-sample {
  border-style: dashed;
  background: rgb(25 244 171 / 22%);
}

body.page-pupil-codes .pupil-codes-name-button.is-sample.is-selected {
  border-style: solid;
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: var(--color-text-on-accent);
}

body.page-pupil-codes .pupil-codes-detail-column {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: var(--pupil-codes-detail-min-height);
}

body.page-pupil-codes .pupil-codes-detail-panel {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-sizing: border-box;
  min-height: var(--pupil-codes-detail-min-height);
  padding: 16px 18px;
  border: 2px solid var(--group-color-4);
  border-radius: var(--radius-card);
  background: rgb(255 255 255 / 92%);
  text-align: center;
}

body.page-pupil-codes .pupil-codes-detail-panel[hidden] {
  display: none !important;
}

body.page-pupil-codes .pupil-codes-detail-empty {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: var(--pupil-codes-detail-min-height);
  margin: 0;
  padding: 16px 18px;
  border: 2px dashed rgb(255 255 255 / 35%);
  border-radius: var(--radius-card);
  background: rgb(0 0 0 / 12%);
  text-align: center;
  font-weight: 600;
  opacity: 0.9;
}

body.page-pupil-codes .pupil-codes-detail-empty[hidden] {
  display: none !important;
}

body.page-pupil-codes .pupil-codes-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  width: 100%;
  max-width: 16rem;
}

body.page-pupil-codes .pupil-codes-detail-actions .continue-button,
body.page-pupil-codes .pupil-codes-detail-actions .edit-cancel-button {
  width: 100%;
}

body.page-pupil-codes .pupil-codes-detail-panel .pupil-code-name {
  color: #2d2640;
}

body.page-pupil-codes .pupil-codes-unlock-dialog .pupil-codes-unlock-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

body.page-pupil-codes .pupil-codes-unlock-dialog .form-message:empty {
  display: none;
}

body.page-pupil-codes .pupil-codes-unlock-dialog .form-message:not(:empty) {
  margin: 0 0 4px;
}

body.page-pupil-codes .pupil-codes-aladdin-dialog {
  width: min(100% - 32px, 28rem);
  max-height: min(80vh, 36rem);
  display: flex;
  flex-direction: column;
}

body.page-pupil-codes .pupil-codes-aladdin-dialog[hidden] {
  display: none !important;
}

body.page-pupil-codes .pupil-codes-aladdin-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  max-height: min(40vh, 18rem);
  overflow: auto;
}

body.page-pupil-codes .pupil-codes-aladdin-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-control);
  background: rgb(0 0 0 / 16%);
}

body.page-pupil-codes .pupil-codes-aladdin-name {
  min-width: 0;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.page-pupil-codes .pupil-codes-print-grid,
body.page-pupil-codes .pupil-codes-print-messages {
  display: none !important;
}

body.page-pupil-codes .pupil-code-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 18px 16px 16px;
  border: 2px solid var(--group-color-4);
  border-radius: var(--radius-card);
  background: rgb(255 255 255 / 88%);
  text-align: center;
}

body.page-pupil-codes .pupil-code-name {
  margin: 0;
  font-size: 1.25rem;
  line-height: var(--line-height-tight);
}

body.page-pupil-codes .pupil-code-qr {
  display: grid;
  place-items: center;
  width: 148px;
  height: 148px;
  padding: 6px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 10px rgb(61 47 82 / 12%);
}

body.page-pupil-codes .pupil-codes-detail-panel .pupil-code-qr {
  width: 120px;
  height: 120px;
}

body.page-pupil-codes .pupil-code-qr img,
body.page-pupil-codes .pupil-code-qr canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

body.page-pupil-codes .pupil-code-value {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgb(45 38 64 / 78%);
}

@media (max-width: 820px) {
  body.page-pupil-codes .expandable-card-heading > :is(h1, h2) {
    flex: 1 1 12rem;
  }
}

@media (max-width: 700px) {
  body.page-pupil-codes .pupil-codes-layout {
    grid-template-columns: 1fr;
  }

  body.page-pupil-codes .pupil-codes-list-panel {
    min-height: 0;
    max-height: 40vh;
  }

  body.page-pupil-codes .pupil-codes-detail-column,
  body.page-pupil-codes .pupil-codes-detail-panel,
  body.page-pupil-codes .pupil-codes-detail-empty {
    min-height: 16rem;
  }
}

@media print {
  @page {
    margin: 12mm;
  }

  body.page-pupil-codes {
    background: #fff !important;
    background-image: none !important;
    color: #000;
    padding: 0 !important;
    margin: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  body.page-pupil-codes::before,
  body.page-pupil-codes .site-header,
  body.page-pupil-codes .site-footer,
  body.page-pupil-codes .pupil-codes-card,
  body.page-pupil-codes .delete-confirm-backdrop,
  body.page-pupil-codes .delete-confirm-dialog {
    display: none !important;
  }

  .no-print {
    display: none !important;
  }

  body.page-pupil-codes.is-print-codes .pupil-codes-print-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8mm;
  }

  body.page-pupil-codes.is-print-codes .pupil-codes-print-messages {
    display: none !important;
  }

  body.page-pupil-codes.is-print-messages .pupil-codes-print-grid {
    display: none !important;
  }

  body.page-pupil-codes.is-print-messages .pupil-codes-print-messages {
    display: block !important;
  }

  body.page-pupil-codes.is-print-messages .pupil-codes-print-page {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 6mm;
    break-after: page;
    page-break-after: always;
  }

  body.page-pupil-codes.is-print-messages .pupil-codes-print-page:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  body.page-pupil-codes .pupil-code-card {
    break-inside: avoid;
    page-break-inside: avoid;
    border: 1px solid #bbb;
    background: #fff;
    box-shadow: none;
  }

  body.page-pupil-codes .pupil-code-name {
    color: #2d2640;
  }

  body.page-pupil-codes .pupil-code-qr {
    box-shadow: none;
  }

  body.page-pupil-codes .pupil-code-message-card {
    box-sizing: border-box;
    flex: 0 0 auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
    padding: 6mm 7mm;
    border: 1px solid #bbb;
    border-radius: 8px;
    background: #fff;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.page-pupil-codes .pupil-code-message-body {
    margin: 0;
    font-family: inherit;
    font-size: 11pt;
    font-weight: 500;
    line-height: 1.4;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    color: #000;
  }
}

/* Pupil profile page */

body.page-pupil {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100dvh;
  box-sizing: border-box;
  padding: 0 var(--page-panel-gap) 32px;
  color: var(--color-text);
}

.pupil-profile {
  width: min(100%, var(--panel-max-wide));
  box-sizing: border-box;
  margin-top: var(--page-body-padding-top);
  text-align: center;
}

.pupil-loading {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-text);
  text-shadow: var(--shadow-text);
}

.pupil-error-card {
  padding: 28px 24px;
  border: var(--border-subtle);
  border-radius: var(--radius-card);
  background: rgb(var(--panel-tint-purple) / var(--panel-op-outer));
  backdrop-filter: blur(8px);
}

.pupil-error-title {
  margin: 0 0 12px;
  font-size: 1.75rem;
  line-height: var(--line-height-title);
}

.pupil-error-text {
  margin: 0;
  font-size: 1.125rem;
  line-height: var(--line-height-body);
  opacity: 0.85;
}

.pupil-layout {
  display: flex;
  align-items: stretch;
  min-height: 0;
  border: 3px solid rgb(255 255 255 / 55%);
  border-radius: var(--radius-card);
  background: rgb(0 0 0 / 22%);
  backdrop-filter: blur(6px);
  overflow: hidden;
  transition: opacity 180ms ease;
}

.pupil-content[data-mode="edit"] .pupil-layout,
.pupil-content[data-mode="view"] .pupil-layout {
  opacity: 1;
}

.pupil-panel {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.pupil-panel-avatar {
  justify-content: center;
  gap: 20px;
  padding: clamp(16px, 3vw, 28px);
}

.pupil-panel-intro {
  justify-content: center;
  padding: clamp(16px, 3vw, 28px);
}

.pupil-panel-actions {
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
}

.pupil-actions-content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  width: 100%;
  min-height: 0;
  padding: clamp(16px, 3vw, 28px);
}

.pupil-panel-divider {
  flex: 0 0 3px;
  align-self: stretch;
  background: linear-gradient(
    180deg,
    rgb(255 255 255 / 28%) 0%,
    rgb(255 255 255 / 55%) 50%,
    rgb(255 255 255 / 28%) 100%
  );
}

/* Customise mode: avatar | selectors (hide intro column) */
.pupil-content[data-mode="edit"] .pupil-panel-intro,
.pupil-content[data-mode="edit"] .pupil-panel-divider--view {
  display: none;
}

.pupil-content[data-mode="edit"] .pupil-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  align-content: stretch;
  height: calc(100dvh - var(--site-header-height) - var(--site-footer-offset) - 40px);
  max-height: calc(100dvh - var(--site-header-height) - var(--site-footer-offset) - 40px);
  min-height: 0;
  flex-wrap: unset;
}

.pupil-content[data-mode="edit"] .pupil-panel-avatar {
  grid-column: 1;
  grid-row: 1;
  flex: unset;
  min-height: 0;
  justify-content: center;
  gap: 0;
  padding: 8px;
}

.pupil-content[data-mode="edit"] .pupil-panel-divider {
  grid-column: 2;
  grid-row: 1;
  flex: unset;
  width: 3px;
  align-self: stretch;
}

.pupil-content[data-mode="edit"] .pupil-panel-actions {
  grid-column: 3;
  grid-row: 1;
  flex: unset;
  min-height: 0;
}

.pupil-content[data-mode="edit"] .pupil-avatar-wrap {
  container-type: size;
  display: flex;
  flex: 1 1 auto;
  align-self: stretch;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 0;
  max-width: none;
  margin: 0;
}

.pupil-content[data-mode="edit"] .pupil-avatar-card {
  box-sizing: border-box;
  width: min(100cqw, calc(100cqh * 400 / 536));
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 400 / 536;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pupil-content[data-mode="edit"] .pupil-avatar-image {
  display: block;
  width: 96%;
  height: 96%;
  max-height: none;
  aspect-ratio: 400 / 536;
  object-fit: contain;
}

.pupil-content[data-mode="edit"] .pupil-edit-actions {
  grid-column: 1 / -1;
  grid-row: 2;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 8px;
  width: min(100%, 34rem);
  max-width: 34rem;
  margin: 0 auto;
  padding: 8px 12px 10px;
}

.pupil-content[data-mode="edit"] .pupil-edit-actions .continue-button {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}

.pupil-content[data-mode="edit"] .pupil-edit-actions .edit-cancel-button {
  flex: 0 1 auto;
  width: auto;
  min-width: 0;
  padding: 8px 10px;
  font-size: var(--font-size-button-secondary);
  white-space: nowrap;
}

.pupil-view-panel,
.pupil-edit-panel {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  width: 100%;
  min-height: 0;
  transition: opacity 180ms ease;
}

.pupil-view-panel {
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.pupil-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45em;
  width: min(100%, 280px);
  margin: 0 auto;
  color: #fff;
  text-shadow: var(--shadow-text);
}

.pupil-intro p {
  margin: 0;
  font-size: clamp(0.95rem, 2.6vw, 1.125rem);
  font-weight: 700;
  line-height: 1.3;
}

.pupil-intro-lead {
  color: #fff;
  font-size: clamp(1.25rem, 3.5vw, 1.5rem) !important;
  line-height: 1.15 !important;
  -webkit-text-stroke: 0.05em var(--color-cauldron-green);
  paint-order: stroke fill;
}

.pupil-intro-cauldron-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 96px;
  margin: 6px 0;
}

.pupil-intro-cauldron {
  display: block;
  width: 88px;
  height: 88px;
  cursor: pointer;
  touch-action: manipulation;
}

.pupil-intro-cauldron-hint {
  position: absolute;
  top: 2px;
  right: 0;
  z-index: 1;
  margin: 0;
  padding: 6px 10px;
  border: 2px solid rgb(255 255 255 / 70%);
  border-radius: 999px;
  background: var(--group-color-4);
  color: var(--color-text);
  font-size: 0.8125rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  text-shadow: none;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 4px 10px rgb(0 0 0 / 18%);
  animation: pupil-intro-hint-bounce 1.4s ease-in-out infinite;
  transition: opacity 220ms ease, transform 220ms ease;
}

.pupil-intro-cauldron-hint.is-dismissed {
  opacity: 0;
  transform: translateY(4px) scale(0.96);
  animation: none;
}

@keyframes pupil-intro-hint-bounce {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

.pupil-edit-panel {
  justify-content: stretch;
}

.pupil-randomise-button {
  flex: 0 0 auto;
  align-self: stretch;
  width: auto;
}

.pupil-customise-button,
.pupil-preview-button {
  width: 100%;
  border: 2px solid rgb(255 255 255 / 55%);
  background: var(--group-color-4);
  color: var(--color-text);
}

.pupil-customise-button {
  width: min(100%, 280px);
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-text-on-accent);
}

.pupil-customise-button:hover:not(:disabled) {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

.pupil-preview-button:hover:not(:disabled) {
  background: #d8b8ea;
}

.pupil-pop-explainer {
  margin: 0;
  width: min(100%, 280px);
  font-size: clamp(0.9rem, 2.4vw, 1.05rem);
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
  text-shadow: var(--shadow-text);
}

.pupil-greeting {
  margin: 0;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  line-height: 1.1;
  color: #fff;
  -webkit-text-stroke: 0.05em var(--color-cauldron-green);
  paint-order: stroke fill;
  text-shadow: var(--shadow-text);
}

.pupil-avatar-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: min(100%, 280px);
  margin: 0 auto;
}

.pupil-avatar-card {
  box-sizing: border-box;
  width: 100%;
  /* Card ~20% tighter around the avatar than the previous frame */
  aspect-ratio: 400 / 536;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid rgb(255 255 255 / 55%);
  border-radius: var(--radius-card);
  background: rgb(201 160 220 / 92%);
}

.pupil-avatar-card[data-card-colour="blue"] {
  background: rgb(126 184 218 / 92%);
}

.pupil-avatar-card[data-card-colour="green"] {
  background: rgb(168 212 138 / 92%);
}

.pupil-avatar-card[data-card-colour="orange"] {
  background: rgb(232 184 109 / 92%);
}

.pupil-avatar-card[data-card-colour="purple"] {
  background: rgb(201 160 220 / 92%);
}

.pupil-avatar-image {
  display: block;
  width: 96%;
  height: 96%;
  aspect-ratio: 400 / 536;
  object-fit: contain;
  transition: opacity 180ms ease;
}

.pupil-fullscreen-exit {
  display: none;
  flex: 0 0 auto;
  width: min(100%, 280px);
  margin: 0;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.pupil-avatar-wrap:fullscreen,
.pupil-avatar-wrap:-webkit-full-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 24px;
  background-color: var(--page-bg-color);
  background-image: var(--page-bg-image);
  background-position: var(--page-bg-position);
  background-repeat: no-repeat;
  background-size: var(--page-bg-size);
}

.pupil-avatar-wrap:fullscreen .pupil-fullscreen-exit,
.pupil-avatar-wrap:-webkit-full-screen .pupil-fullscreen-exit {
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.pupil-avatar-wrap:fullscreen .pupil-avatar-card,
.pupil-avatar-wrap:-webkit-full-screen .pupil-avatar-card {
  flex-shrink: 0;
  width: min(92vw, calc((100dvh - 140px) * 400 / 536), 560px);
  max-width: none;
}

.pupil-avatar-wrap:fullscreen .pupil-avatar-image,
.pupil-avatar-wrap:-webkit-full-screen .pupil-avatar-image {
  width: 96%;
  height: 96%;
  max-width: none;
}

.pupil-pop-total {
  width: min(100%, 280px);
  padding: 16px 24px 20px;
  border: 3px solid rgb(255 255 255 / 55%);
  border-radius: var(--radius-card);
  background: rgb(var(--panel-tint-purple) / var(--panel-op-nest));
}

.pupil-pop-label {
  margin: 0 0 4px;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: var(--shadow-text);
}

.pupil-pop-count {
  margin: 0;
  font-size: clamp(2.5rem, 10vw, 4rem);
  line-height: 1;
  color: var(--color-cauldron-green);
  -webkit-text-stroke: 0.05em #fff;
  paint-order: stroke fill;
  text-shadow: var(--shadow-text);
}

.pupil-selectors {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 0;
}

.pupil-selector {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 8px;
  row-gap: 6px;
  min-height: 0;
  padding: 10px 14px 12px;
  border: 2px solid rgb(255 255 255 / 45%);
  border-radius: var(--radius-card);
  background: rgb(var(--panel-tint-purple) / var(--panel-op-mid));
}

.pupil-selector-label {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-align: center;
  text-transform: uppercase;
  color: #fff;
  text-shadow: var(--shadow-text);
}

.pupil-selector-control {
  display: contents;
}

.pupil-selector-arrow[data-direction="prev"] {
  grid-column: 1;
  grid-row: 2;
}

.pupil-selector-value {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  min-width: 0;
  font-size: clamp(1rem, 2.3vw, 1.25rem);
  line-height: 1.15;
  text-align: center;
  color: #fff;
  text-shadow: var(--shadow-text);
}

.pupil-selector-arrow[data-direction="next"] {
  grid-column: 3;
  grid-row: 2;
}

.pupil-selector-arrow {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 2px solid rgb(255 255 255 / 55%);
  border-radius: 50%;
  background: rgb(var(--panel-tint-purple) / var(--panel-op-outer));
  color: #fff;
  font-family: inherit;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease;
}

.pupil-selector-arrow:hover:not(:disabled) {
  background: rgb(var(--panel-tint-purple) / var(--panel-op-strong));
  transform: scale(1.04);
}

.pupil-selector-arrow:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pupil-edit-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 12px;
  width: min(100%, 280px);
  margin: 0 auto;
  padding: 0;
  transition: opacity 180ms ease;
}

.pupil-edit-actions .continue-button {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}

.pupil-edit-actions .edit-cancel-button {
  flex: 0 1 auto;
  width: auto;
  min-width: 0;
}

.pupil-panel-avatar .pupil-preview-button {
  width: auto;
}

@media (max-width: 900px) {
  .pupil-layout {
    flex-direction: column;
    min-height: auto;
  }

  .pupil-panel-divider {
    flex: 0 0 3px;
    width: 100%;
    background: linear-gradient(
      90deg,
      rgb(255 255 255 / 28%) 0%,
      rgb(255 255 255 / 55%) 50%,
      rgb(255 255 255 / 28%) 100%
    );
  }

  .pupil-panel-avatar,
  .pupil-panel-intro,
  .pupil-panel-actions {
    flex: 0 0 auto;
    width: 100%;
  }

  .pupil-actions-content {
    min-height: 0;
  }

  /* Compact customise: avatar | selectors, actions bar below — fit without scrolling */
  .pupil-content[data-mode="edit"] .pupil-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    grid-template-rows: minmax(0, 1fr) auto;
    height: calc(100dvh - var(--site-header-height) - var(--site-footer-offset) - 24px);
    max-height: calc(100dvh - var(--site-header-height) - var(--site-footer-offset) - 24px);
    overflow: hidden;
  }

  .pupil-content[data-mode="edit"] .pupil-panel-divider {
    display: none;
  }

  .pupil-content[data-mode="edit"] .pupil-panel-avatar {
    grid-column: 1;
    grid-row: 1;
    width: auto;
    min-width: 0;
    justify-content: center;
    gap: 0;
    padding: 8px 6px;
  }

  .pupil-content[data-mode="edit"] .pupil-panel-actions {
    grid-column: 2;
    grid-row: 1;
    width: auto;
    min-width: 0;
  }

  .pupil-content[data-mode="edit"] .pupil-actions-content {
    padding: 10px 8px 8px;
  }

  .pupil-content[data-mode="edit"] .pupil-avatar-wrap {
    width: 100%;
    max-height: none;
    flex: 1 1 auto;
  }

  .pupil-content[data-mode="edit"] .pupil-avatar-card {
    height: auto;
    max-height: 100%;
    padding: 0;
  }

  .pupil-content[data-mode="edit"] .pupil-avatar-image {
    max-height: none;
    width: 96%;
    height: 96%;
    max-width: none;
    margin-inline: 0;
  }

  .pupil-content[data-mode="edit"] .pupil-edit-panel {
    justify-content: center;
  }

  .pupil-content[data-mode="edit"] .pupil-selectors {
    gap: 8px;
    justify-content: center;
  }

  .pupil-content[data-mode="edit"] .pupil-selector {
    position: relative;
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    grid-template-rows: auto;
    column-gap: 6px;
    row-gap: 0;
    padding: 8px 8px;
  }

  .pupil-content[data-mode="edit"] .pupil-selector-label {
    grid-column: 2;
    grid-row: 1;
    font-size: 0.8125rem;
    letter-spacing: 0.04em;
  }

  .pupil-content[data-mode="edit"] .pupil-selector-arrow[data-direction="prev"],
  .pupil-content[data-mode="edit"] .pupil-selector-arrow[data-direction="next"] {
    grid-row: 1;
  }

  .pupil-content[data-mode="edit"] .pupil-selector-value {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .pupil-content[data-mode="edit"] .pupil-selector-arrow {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }

  .pupil-content[data-mode="edit"] .pupil-edit-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    flex: 0 0 auto;
    flex-wrap: wrap;
    width: min(100%, 22rem);
    max-width: 22rem;
    margin: 0 auto;
    padding: 6px 8px 8px;
    gap: 6px;
  }

  .pupil-content[data-mode="edit"] .pupil-edit-actions .continue-button {
    flex: 1 1 auto;
    padding: 7px 8px;
    font-size: 0.9375rem;
  }

  .pupil-content[data-mode="edit"] .pupil-edit-actions .edit-cancel-button {
    flex: 0 1 auto;
    padding: 7px 8px;
    font-size: 0.875rem;
  }
}

/* Turn taking page */

body.page-turn-taking {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

body.page-turn-taking.has-site-chrome {
  padding-top: var(--site-header-height);
}

body.page-turn-taking .turn-taking-page-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

body.page-turn-taking .turn-taking-shell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(100%, var(--panel-max-wide));
  margin-inline: auto;
  box-sizing: border-box;
}

body.page-turn-taking .turn-taking-card,
body.page-turn-taking .turn-taking-display {
  width: 100%;
  box-sizing: border-box;
}

body.page-turn-taking .turn-taking-card {
  max-height: none;
}

body.page-turn-taking .resource-pickers-row,
body.page-random-order .resource-pickers-row,
body.page-jobs-board .resource-pickers-row,
body.page-team-builder .resource-pickers-row,
body.page-group-checklist .resource-pickers-row {
  display: flex;
  align-items: stretch;
  gap: 16px;
  margin-bottom: 22px;
}

.resource-picker-mode-block {
  margin-bottom: 0;
}

.resource-picker-mode {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 16px;
  font-size: var(--font-size-body);
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
}

.resource-picker-mode-label {
  margin: 0 4px 0 0;
  color: inherit;
}

.resource-picker-mode-choice {
  position: relative;
  display: inline-flex;
  margin: 0;
  cursor: pointer;
}

.resource-picker-mode-choice input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.resource-picker-mode-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 2.25rem;
  padding: 6px 14px;
  border: var(--border-button);
  border-radius: 999px;
  background: rgb(0 0 0 / 35%);
  color: inherit;
  font: inherit;
  font-weight: 700;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.resource-picker-mode-choice:hover .resource-picker-mode-button {
  background: rgb(0 0 0 / 45%);
}

.resource-picker-mode-choice input:checked + .resource-picker-mode-button {
  border-color: var(--color-accent);
  background: rgb(0 0 0 / 50%);
  box-shadow: 0 0 0 1px rgb(25 244 171 / 35%);
}

.resource-picker-mode-choice input:focus-visible + .resource-picker-mode-button {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .resource-picker-mode {
    flex-direction: column;
    align-items: stretch;
  }

  .resource-picker-mode-label {
    margin: 0;
    text-align: center;
  }

  .resource-picker-mode-choice {
    width: 100%;
  }

  .resource-picker-mode-button {
    width: 100%;
  }
}

.resource-create-columns-label {
  margin: 0 0 8px;
  font-size: var(--font-size-resource-section);
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.resource-assign-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
  margin: 0 0 18px;
}

.resource-assign-actions .random-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 12rem;
  width: auto;
  min-width: min(100%, 12rem);
  margin: 0;
}

.resource-assign-actions .resource-clear-assign-button {
  flex: 0 1 auto;
  width: auto;
  min-width: 0;
  margin: 0;
}

body.page-turn-taking .resource-pickers-row:not([data-picker-mode]) .resource-pickers-pupils,
body.page-turn-taking .resource-pickers-row:not([data-picker-mode]) .resource-pickers-groups,
body.page-random-order .resource-pickers-row:not([data-picker-mode]) .resource-pickers-pupils,
body.page-random-order .resource-pickers-row:not([data-picker-mode]) .resource-pickers-groups,
body.page-random-order .resource-pickers-row:not([data-picker-mode]) .resource-pickers-class,
body.page-jobs-board .resource-pickers-row:not([data-picker-mode]) .resource-pickers-pupils,
body.page-jobs-board .resource-pickers-row:not([data-picker-mode]) .resource-pickers-groups,
body.page-team-builder .resource-pickers-row:not([data-picker-mode]) .resource-pickers-pupils,
body.page-team-builder .resource-pickers-row:not([data-picker-mode]) .resource-pickers-groups,
body.page-group-checklist .resource-pickers-row:not([data-picker-mode]) .resource-pickers-pupils,
body.page-group-checklist .resource-pickers-row:not([data-picker-mode]) .resource-pickers-groups,
body.page-turn-taking .resource-pickers-row[data-picker-mode="pupils"] .resource-pickers-groups,
body.page-random-order .resource-pickers-row[data-picker-mode="pupils"] .resource-pickers-groups,
body.page-random-order .resource-pickers-row[data-picker-mode="pupils"] .resource-pickers-class,
body.page-jobs-board .resource-pickers-row[data-picker-mode="pupils"] .resource-pickers-groups,
body.page-team-builder .resource-pickers-row[data-picker-mode="pupils"] .resource-pickers-groups,
body.page-group-checklist .resource-pickers-row[data-picker-mode="pupils"] .resource-pickers-groups,
body.page-turn-taking .resource-pickers-row[data-picker-mode="groups"] .resource-pickers-pupils,
body.page-random-order .resource-pickers-row[data-picker-mode="groups"] .resource-pickers-pupils,
body.page-random-order .resource-pickers-row[data-picker-mode="groups"] .resource-pickers-class,
body.page-jobs-board .resource-pickers-row[data-picker-mode="groups"] .resource-pickers-pupils,
body.page-team-builder .resource-pickers-row[data-picker-mode="groups"] .resource-pickers-pupils,
body.page-group-checklist .resource-pickers-row[data-picker-mode="groups"] .resource-pickers-pupils,
body.page-random-order .resource-pickers-row[data-picker-mode="class"] .resource-pickers-pupils,
body.page-random-order .resource-pickers-row[data-picker-mode="class"] .resource-pickers-groups {
  display: none !important;
}

body.page-turn-taking .resource-pickers-row[data-picker-mode="pupils"] .resource-pickers-pupils,
body.page-random-order .resource-pickers-row[data-picker-mode="pupils"] .resource-pickers-pupils,
body.page-jobs-board .resource-pickers-row[data-picker-mode="pupils"] .resource-pickers-pupils,
body.page-team-builder .resource-pickers-row[data-picker-mode="pupils"] .resource-pickers-pupils,
body.page-group-checklist .resource-pickers-row[data-picker-mode="pupils"] .resource-pickers-pupils,
body.page-turn-taking .resource-pickers-row[data-picker-mode="groups"] .resource-pickers-groups,
body.page-random-order .resource-pickers-row[data-picker-mode="groups"] .resource-pickers-groups,
body.page-jobs-board .resource-pickers-row[data-picker-mode="groups"] .resource-pickers-groups,
body.page-team-builder .resource-pickers-row[data-picker-mode="groups"] .resource-pickers-groups,
body.page-group-checklist .resource-pickers-row[data-picker-mode="groups"] .resource-pickers-groups,
body.page-random-order .resource-pickers-row[data-picker-mode="class"] .resource-pickers-class {
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
}

body.page-turn-taking .resource-pickers-row:not([data-picker-mode]),
body.page-random-order .resource-pickers-row:not([data-picker-mode]),
body.page-jobs-board .resource-pickers-row:not([data-picker-mode]),
body.page-team-builder .resource-pickers-row:not([data-picker-mode]),
body.page-group-checklist .resource-pickers-row:not([data-picker-mode]) {
  margin-bottom: 0;
  min-height: 0;
}

body.page-turn-taking .resource-pickers-row > .turn-taking-section,
body.page-random-order .resource-pickers-row > .random-order-section,
body.page-jobs-board .resource-pickers-row > .unassigned-pool,
body.page-jobs-board .resource-pickers-row > .jobs-board-groups-section,
body.page-team-builder .resource-pickers-row > .unassigned-pool,
body.page-team-builder .resource-pickers-row > .team-builder-groups-section,
body.page-group-checklist .resource-pickers-row > .unassigned-pool,
body.page-group-checklist .resource-pickers-row > .team-builder-groups-section {
  margin-bottom: 0;
}

body.page-turn-taking .resource-pickers-pupils,
body.page-random-order .resource-pickers-pupils,
body.page-jobs-board .resource-pickers-pupils,
body.page-team-builder .resource-pickers-pupils,
body.page-group-checklist .resource-pickers-pupils {
  flex: 1 1 0;
  min-width: 0;
}

body.page-turn-taking .resource-pickers-groups,
body.page-random-order .resource-pickers-groups,
body.page-jobs-board .resource-pickers-groups,
body.page-team-builder .resource-pickers-groups,
body.page-group-checklist .resource-pickers-groups {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  display: flex;
  flex-direction: column;
}

body.page-turn-taking .resource-pickers-groups .turn-taking-chips,
body.page-random-order .resource-pickers-groups .random-order-chips,
body.page-jobs-board .resource-pickers-groups .jobs-board-group-chips,
body.page-team-builder .resource-pickers-groups .team-builder-group-chips,
body.page-group-checklist .resource-pickers-groups .team-builder-group-chips {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
}

body.page-turn-taking .resource-pickers-groups .turn-taking-chip,
body.page-random-order .resource-pickers-groups .random-order-chip,
body.page-jobs-board .resource-pickers-groups .jobs-board-group-chip,
body.page-team-builder .resource-pickers-groups .team-builder-group-chip,
body.page-group-checklist .resource-pickers-groups .team-builder-group-chip {
  width: auto;
  box-sizing: border-box;
  text-align: center;
}

@media (max-width: 700px) {
  body.page-turn-taking .resource-pickers-row,
  body.page-random-order .resource-pickers-row,
  body.page-jobs-board .resource-pickers-row,
  body.page-team-builder .resource-pickers-row,
  body.page-group-checklist .resource-pickers-row {
    flex-direction: column;
  }

  body.page-turn-taking .resource-pickers-groups,
  body.page-random-order .resource-pickers-groups,
  body.page-jobs-board .resource-pickers-groups,
  body.page-team-builder .resource-pickers-groups,
  body.page-group-checklist .resource-pickers-groups {
    width: 100%;
  }

  body.page-turn-taking .resource-pickers-groups .turn-taking-chips,
  body.page-random-order .resource-pickers-groups .random-order-chips,
  body.page-jobs-board .resource-pickers-groups .jobs-board-group-chips,
  body.page-team-builder .resource-pickers-groups .team-builder-group-chips,
  body.page-group-checklist .resource-pickers-groups .team-builder-group-chips {
    flex-direction: row;
    flex-wrap: wrap;
  }

  body.page-turn-taking .resource-pickers-groups .turn-taking-chip,
  body.page-random-order .resource-pickers-groups .random-order-chip,
  body.page-jobs-board .resource-pickers-groups .jobs-board-group-chip,
  body.page-team-builder .resource-pickers-groups .team-builder-group-chip,
  body.page-group-checklist .resource-pickers-groups .team-builder-group-chip {
    width: auto;
  }
}

body.page-turn-taking .turn-taking-section {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: none;
  border-radius: var(--radius-card);
  background: var(--panel-nested-fill);
}

body.page-turn-taking .turn-taking-section h2 {
  margin: 0 0 12px;
  font-size: var(--font-size-resource-section);
  font-weight: 700;
  line-height: var(--line-height-tight);
}

body.page-turn-taking .turn-taking-section-hint {
  margin: 0 0 12px;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: var(--line-height-body);
  opacity: 0.85;
}

body.page-turn-taking .turn-taking-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 40px;
}

body.page-turn-taking .turn-taking-chip {
  padding: 8px 14px;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  background: rgb(140 140 140 / 55%);
  color: #fff;
  font-family: inherit;
  font-size: var(--font-size-small);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

body.page-turn-taking .turn-taking-chip:hover {
  filter: brightness(1.08);
}

body.page-turn-taking .turn-taking-chip.is-selected {
  border-color: rgb(255 255 255 / 55%);
  box-shadow: 0 0 0 2px rgb(255 255 255 / 45%);
  transform: translateY(-1px);
}

body.page-turn-taking .turn-taking-chip.is-group {
  color: #2d2640;
}

body.page-turn-taking .turn-taking-queue {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 44px;
  padding: 12px;
  border: 2px dashed rgb(255 255 255 / 28%);
  border-radius: var(--radius-card);
  background: var(--panel-nested-fill);
}

body.page-turn-taking .turn-taking-queue.is-empty::before {
  content: "Tap groups or pupils above to build the turn order";
  font-size: var(--font-size-small);
  font-weight: 600;
  opacity: 0.72;
}

body.page-turn-taking .turn-taking-queue-item {
  display: inline-flex;
  align-items: stretch;
  max-width: 100%;
  border: 2px solid rgb(255 255 255 / 35%);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

body.page-turn-taking .turn-taking-queue-item.is-pupil {
  background: rgb(126 184 218 / 88%);
  color: #2d2640;
}

body.page-turn-taking .turn-taking-queue-item.is-group {
  color: #2d2640;
}

body.page-turn-taking .turn-taking-queue-chip {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 8px 10px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: var(--font-size-small);
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

body.page-turn-taking .turn-taking-queue-move {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  margin: 0;
  padding: 0 6px;
  border: none;
  border-radius: 0;
  background: rgb(0 0 0 / 18%);
  color: inherit;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

body.page-turn-taking .turn-taking-queue-move:hover:not(:disabled) {
  background: rgb(0 0 0 / 28%);
}

body.page-turn-taking .turn-taking-queue-move:disabled {
  opacity: 0.35;
  cursor: default;
}

body.page-turn-taking .turn-taking-slider-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body.page-turn-taking .turn-taking-duration {
  margin: 0;
  font-size: var(--font-size-body);
  font-weight: 700;
}

body.page-turn-taking .turn-taking-slider {
  width: 100%;
  accent-color: var(--group-color-4);
  cursor: pointer;
}

body.page-turn-taking .turn-taking-status {
  margin: 0 0 16px;
  font-size: var(--font-size-small);
  font-weight: 600;
  opacity: 0.85;
}

/* Resource / setup status tones (green confirm, red error, yellow warning) */
body.page-turn-taking .turn-taking-status.is-success,
body.page-random-order .random-order-status.is-success,
body.page-team-builder .team-builder-status.is-success,
body.page-jobs-board .jobs-board-status.is-success,
body.page-group-checklist .group-checklist-status.is-success,
body.page-quiet-pops .quiet-pops-status.is-success,
body.page-revision-board .revision-board-status.is-success,
body.page-what-if-board .what-if-board-status.is-success,
body.page-first-next-then .first-next-then-status.is-success,
body.page-pop-pal-prompts .pop-pal-prompts-status.is-success {
  color: var(--color-accent);
  opacity: 1;
}

body.page-turn-taking .turn-taking-status.is-error,
body.page-random-order .random-order-status.is-error,
body.page-team-builder .team-builder-status.is-error,
body.page-jobs-board .jobs-board-status.is-error,
body.page-group-checklist .group-checklist-status.is-error,
body.page-quiet-pops .quiet-pops-status.is-error,
body.page-revision-board .revision-board-status.is-error,
body.page-what-if-board .what-if-board-status.is-error,
body.page-first-next-then .first-next-then-status.is-error,
body.page-pop-pal-prompts .pop-pal-prompts-status.is-error {
  color: var(--color-error);
  opacity: 1;
}

body.page-turn-taking .turn-taking-status.is-warning,
body.page-random-order .random-order-status.is-warning,
body.page-team-builder .team-builder-status.is-warning,
body.page-jobs-board .jobs-board-status.is-warning,
body.page-group-checklist .group-checklist-status.is-warning,
body.page-quiet-pops .quiet-pops-status.is-warning,
body.page-revision-board .revision-board-status.is-warning,
body.page-what-if-board .what-if-board-status.is-warning,
body.page-first-next-then .first-next-then-status.is-warning,
body.page-pop-pal-prompts .pop-pal-prompts-status.is-warning {
  color: var(--color-warning);
  opacity: 1;
}

body.page-turn-taking .turn-taking-status[hidden],
body.page-turn-taking .turn-taking-view[hidden] {
  display: none !important;
}

body.page-turn-taking .turn-taking-display {
  padding: clamp(20px, 4vw, 36px);
  border: var(--border-subtle);
  border-radius: var(--radius-card);
  background-color: rgb(var(--panel-tint-purple) / var(--panel-op-outer));
  text-align: center;
}

body.page-turn-taking .turn-taking-progress {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: clamp(12px, 2.5vw, 20px);
}

body.page-turn-taking .turn-taking-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgb(255 255 255 / 35%);
  background: rgb(201 160 220 / 35%);
}

body.page-turn-taking .turn-taking-dot.is-done {
  background: var(--group-color-2);
  border-color: rgb(255 255 255 / 45%);
}

body.page-turn-taking .turn-taking-dot.is-current {
  background: var(--group-color-4);
  border-color: rgb(255 255 255 / 75%);
  box-shadow: 0 0 0 3px rgb(201 160 220 / 55%);
  transform: scale(1.15);
}

body.page-turn-taking .turn-taking-stage {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 4vw, 40px);
  margin: 0 auto clamp(12px, 2vw, 20px);
  width: fit-content;
  max-width: 100%;
}

body.page-turn-taking .turn-taking-current-name {
  margin: 0;
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(50vw, 28rem);
  color: #fff;
  font-size: clamp(1.75rem, 6vw, 4rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: right;
  word-break: break-word;
  -webkit-text-stroke: 0.05em var(--color-cauldron-green);
  paint-order: stroke fill;
  text-shadow: var(--shadow-text);
}

body.page-turn-taking .turn-taking-countdown-wrap {
  position: relative;
  flex: 0 0 auto;
  width: min(42vw, 240px);
  height: min(42vw, 240px);
  margin: 0;
}

body.page-turn-taking .turn-taking-countdown-arc {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

body.page-turn-taking .turn-taking-countdown-track {
  fill: none;
  stroke: rgb(201 160 220 / 35%);
  stroke-width: 10;
}

body.page-turn-taking .turn-taking-countdown-progress {
  fill: none;
  stroke: var(--group-color-4);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke 0.3s ease;
}

body.page-turn-taking .turn-taking-countdown-progress.is-amber {
  stroke: var(--group-color-3);
}

body.page-turn-taking .turn-taking-countdown-progress.is-red {
  stroke: #e05a5a;
}

body.page-turn-taking .turn-taking-countdown-number {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(2rem, 8vw, 3.5rem);
  font-weight: 700;
  line-height: 1;
}

body.page-turn-taking .turn-taking-up-next {
  margin: 0 0 clamp(14px, 3vw, 24px);
  font-size: clamp(1rem, 3vw, 1.35rem);
  font-weight: 600;
  opacity: 0.85;
}

body.page-turn-taking .turn-taking-up-next strong {
  opacity: 1;
}

body.page-turn-taking .turn-taking-done-title {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 6vw, 2.5rem);
  line-height: 1.1;
}

body.page-turn-taking .turn-taking-done-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0 0 clamp(24px, 4vw, 36px);
  padding: 0;
  list-style: none;
}

body.page-turn-taking .turn-taking-done-list li {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-body);
  font-weight: 700;
}

body.page-turn-taking .turn-taking-done-list li.is-group {
  border: 2px solid rgb(255 255 255 / 35%);
}

body.page-turn-taking .turn-taking-done-list li.is-pupil {
  background: rgb(126 184 218 / 88%);
  color: #2d2640;
}

/* Random order page */

body.page-random-order {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

body.page-random-order.has-site-chrome {
  padding-top: var(--site-header-height);
}

body.page-random-order .random-order-page-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

body.page-random-order .random-order-shell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
  width: min(100%, var(--panel-max-wide));
  margin-inline: auto;
  box-sizing: border-box;
}

body.page-random-order .random-order-card,
body.page-random-order .random-order-output {
  width: 100%;
  box-sizing: border-box;
  max-height: none;
}

body.page-random-order .random-order-status {
  margin: 0 0 16px;
  font-size: var(--font-size-small);
  font-weight: 600;
  opacity: 0.85;
}

body.page-random-order .random-order-view[hidden] {
  display: none !important;
}

body.page-random-order .random-order-section {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: none;
  border-radius: var(--radius-card);
  background: var(--panel-nested-fill);
}

body.page-random-order .random-order-section h2 {
  margin: 0 0 12px;
  font-size: var(--font-size-resource-section);
  font-weight: 700;
  line-height: var(--line-height-tight);
}

body.page-random-order .random-order-section-hint {
  margin: 0 0 12px;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: var(--line-height-body);
  opacity: 0.85;
}

body.page-random-order .random-order-chips,
body.page-random-order .random-order-selection {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 40px;
}

body.page-random-order .random-order-selection {
  padding: 12px;
  border-radius: var(--radius-card);
  background: var(--panel-nested-fill);
}

body.page-random-order .random-order-selection.is-empty::before {
  content: "No pupils selected yet";
  font-size: var(--font-size-small);
  font-weight: 600;
  opacity: 0.65;
}

body.page-random-order .random-order-chip,
body.page-random-order .random-order-selection-chip {
  padding: 8px 14px;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  background: rgb(140 140 140 / 55%);
  color: #fff;
  font-family: inherit;
  font-size: var(--font-size-small);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

body.page-random-order .random-order-chip:hover,
body.page-random-order .random-order-selection-chip:hover {
  transform: translateY(-1px);
}

body.page-random-order .random-order-chip.is-selected,
body.page-random-order .random-order-selection-chip {
  border-color: rgb(255 255 255 / 85%);
  box-shadow: 0 0 0 2px rgb(255 255 255 / 25%);
}

body.page-random-order .random-order-chip.is-pupil {
  background: rgb(255 255 255 / 22%);
  color: inherit;
}

body.page-random-order .random-order-chip.is-pupil.is-selected {
  background: var(--color-accent);
  color: var(--color-text-on-accent);
}

body.page-random-order .random-order-output-intro {
  margin: 0 0 20px;
  font-size: var(--font-size-body);
  font-weight: 600;
  opacity: 0.9;
}

body.page-random-order .random-order-output-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  counter-reset: random-order;
}

@media (max-width: 900px) {
  body.page-random-order .random-order-output-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  body.page-random-order .random-order-output-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

body.page-random-order .random-order-output-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 14px 14px 14px 52px;
  border: var(--border-subtle);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-card);
  background: var(--resource-display-card-fill);
  color: #fff;
  font-size: clamp(1.125rem, 2.8vw, 1.5rem);
  font-weight: 700;
  line-height: var(--line-height-tight);
  letter-spacing: 0.02em;
  position: relative;
  min-width: 0;
  overflow-wrap: anywhere;
  -webkit-text-stroke: 0.05em var(--color-cauldron-green);
  paint-order: stroke fill;
  text-shadow: var(--shadow-text);
}

body.page-random-order .random-order-output-item::before {
  counter-increment: random-order;
  content: counter(random-order);
  position: absolute;
  left: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-text-on-accent);
  font-size: var(--font-size-body);
  flex-shrink: 0;
  -webkit-text-stroke: 0;
  text-shadow: none;
}

/* Pop Pal Prompts page */

body.page-pop-pal-prompts {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

body.page-pop-pal-prompts.has-site-chrome {
  padding-top: var(--site-header-height);
}

body.page-pop-pal-prompts .pop-pal-prompts-page-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-height: 0;
  box-sizing: border-box;
}

body.page-pop-pal-prompts .pop-pal-prompts-shell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(100%, var(--panel-max-wide));
  margin-inline: auto;
  min-height: 0;
  flex: 1 1 auto;
  box-sizing: border-box;
}

body.page-pop-pal-prompts .pop-pal-prompts-card,
body.page-pop-pal-prompts .pop-pal-prompts-output {
  width: 100%;
  box-sizing: border-box;
  min-height: 0;
}

body.page-pop-pal-prompts .pop-pal-prompts-output.resource-fullscreen-target {
  max-height: none;
}

body.page-pop-pal-prompts .pop-pal-prompts-output .resource-fullscreen-stage {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: safe center;
  gap: clamp(12px, 2vh, 20px);
  min-height: 0;
  overflow: auto;
}

body.page-pop-pal-prompts .pop-pal-prompts-output-list {
  flex: 0 1 auto;
  min-height: 0;
  overflow: auto;
}

body.page-pop-pal-prompts
  .pop-pal-prompts-output.resource-fullscreen-target:fullscreen
  .pop-pal-prompts-output-title,
body.page-pop-pal-prompts
  .pop-pal-prompts-output.resource-fullscreen-target:-webkit-full-screen
  .pop-pal-prompts-output-title {
  margin-bottom: clamp(12px, 2vh, 24px);
  font-size: clamp(1.5rem, 4.5vh, 3rem);
}

body.page-pop-pal-prompts
  .pop-pal-prompts-output.resource-fullscreen-target:fullscreen
  .pop-pal-prompts-output-image,
body.page-pop-pal-prompts
  .pop-pal-prompts-output.resource-fullscreen-target:-webkit-full-screen
  .pop-pal-prompts-output-image {
  max-height: min(200px, 22vh);
}

body.page-pop-pal-prompts
  .pop-pal-prompts-output.resource-fullscreen-target:fullscreen
  .pop-pal-prompts-output-item,
body.page-pop-pal-prompts
  .pop-pal-prompts-output.resource-fullscreen-target:-webkit-full-screen
  .pop-pal-prompts-output-item {
  padding: clamp(10px, 1.5vh, 18px) clamp(12px, 1.5vw, 20px) clamp(10px, 1.5vh, 18px)
    clamp(44px, 4vw, 60px);
  font-size: clamp(1.05rem, 2.4vh, 1.85rem);
}

body.page-pop-pal-prompts
  .pop-pal-prompts-output.resource-fullscreen-target:fullscreen
  .pop-pal-prompts-output-prompt-image,
body.page-pop-pal-prompts
  .pop-pal-prompts-output.resource-fullscreen-target:-webkit-full-screen
  .pop-pal-prompts-output-prompt-image {
  max-height: min(70px, 8vh);
}

body.page-pop-pal-prompts
  .pop-pal-prompts-output.resource-fullscreen-target:fullscreen
  .pop-pal-prompts-output-wagoll-image,
body.page-pop-pal-prompts
  .pop-pal-prompts-output.resource-fullscreen-target:-webkit-full-screen
  .pop-pal-prompts-output-wagoll-image {
  max-height: min(90px, 10vh);
}

body.page-pop-pal-prompts .pop-pal-prompts-status {
  margin: 0 0 16px;
  font-size: var(--font-size-small);
  font-weight: 600;
  opacity: 0.85;
}

body.page-pop-pal-prompts .pop-pal-prompts-view[hidden] {
  display: none !important;
}

body.page-pop-pal-prompts .pop-pal-prompts-section {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: none;
  border-radius: var(--radius-card);
  background: var(--panel-nested-fill);
}

body.page-pop-pal-prompts .pop-pal-prompts-section h2 {
  margin: 0 0 12px;
  font-size: var(--font-size-resource-section);
  font-weight: 700;
  line-height: var(--line-height-tight);
}

body.page-pop-pal-prompts .pop-pal-prompts-section-hint {
  margin: 0 0 12px;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: var(--line-height-body);
  opacity: 0.85;
}

body.page-pop-pal-prompts .pop-pal-prompts-field {
  display: block;
}

body.page-pop-pal-prompts .pop-pal-prompts-title-input,
body.page-pop-pal-prompts .pop-pal-prompts-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: var(--border-subtle);
  border-radius: var(--radius-card);
  background: rgb(255 255 255 / 18%);
  color: inherit;
  font-family: inherit;
  font-size: var(--font-size-body);
  font-weight: 600;
}

body.page-pop-pal-prompts .pop-pal-prompts-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

body.page-pop-pal-prompts .pop-pal-prompts-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

body.page-pop-pal-prompts .pop-pal-prompts-row-content {
  min-width: 0;
}

body.page-pop-pal-prompts .image-field-row > .pop-pal-prompts-input,
body.page-pop-pal-prompts .pop-pal-prompts-row .pop-pal-prompts-input {
  width: auto;
}

body.page-pop-pal-prompts .pop-pal-prompts-remove-button {
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgb(0 0 0 / 12%);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

body.page-pop-pal-prompts .pop-pal-prompts-remove-button:hover {
  background: rgb(255 255 255 / 28%);
}

body.page-pop-pal-prompts .pop-pal-prompts-output-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 0 0 clamp(12px, 2vw, 20px);
  font-size: clamp(1.75rem, 6vw, 2.75rem);
  line-height: 1.1;
  text-align: center;
}

body.page-pop-pal-prompts .pop-pal-prompts-output-image {
  display: block;
  max-width: min(100%, 480px);
  max-height: 200px;
  border-radius: var(--radius-control);
  object-fit: contain;
}

body.page-pop-pal-prompts .pop-pal-prompts-output-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 10px;
  width: 100%;
  max-width: none;
  margin: 0 0 clamp(12px, 2vw, 20px);
  padding: 0;
  list-style: none;
  counter-reset: pop-pal-prompt;
}

body.page-pop-pal-prompts .pop-pal-prompts-output-item {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  margin: 0;
  min-width: 0;
  padding: 10px 14px 10px 52px;
  border: var(--border-subtle);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-card);
  background: var(--resource-display-card-fill);
  font-size: clamp(1rem, 3.5vw, 1.35rem);
  font-weight: 700;
  line-height: var(--line-height-body);
  text-align: left;
}

body.page-pop-pal-prompts .pop-pal-prompts-output-item > span {
  flex: 1 1 auto;
  min-width: 0;
}

body.page-pop-pal-prompts .pop-pal-prompts-output-prompt-image {
  display: block;
  flex: 0 0 auto;
  width: auto;
  max-width: min(50%, 180px);
  max-height: 80px;
  border-radius: var(--radius-control);
  object-fit: contain;
}

body.page-pop-pal-prompts .pop-pal-prompts-output-wagoll {
  width: 100%;
  max-width: 42rem;
  margin: 0 auto clamp(24px, 4vw, 36px);
  text-align: center;
}

body.page-pop-pal-prompts .pop-pal-prompts-output-wagoll-image {
  display: block;
  width: 100%;
  max-width: min(100%, 280px);
  max-height: min(25vh, 210px);
  margin: 0 auto;
  border: var(--border-subtle);
  border-radius: var(--radius-card);
  object-fit: contain;
}

body.page-pop-pal-prompts .pop-pal-prompts-output-item::before {
  counter-increment: pop-pal-prompt;
  content: counter(pop-pal-prompt);
  position: absolute;
  left: 14px;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-text-on-accent);
  font-size: var(--font-size-small);
  transform: translateY(-50%);
}

/* What-If Board page */

body.page-what-if-board {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

body.page-what-if-board.has-site-chrome {
  padding-top: var(--site-header-height);
}

body.page-what-if-board .what-if-board-page-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

body.page-what-if-board .what-if-board-shell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(100%, var(--panel-max-wide));
  margin-inline: auto;
  box-sizing: border-box;
}

body.page-what-if-board .what-if-board-card,
body.page-what-if-board .what-if-board-output {
  width: 100%;
  box-sizing: border-box;
  max-height: none;
}

body.page-what-if-board .what-if-board-status {
  margin: 0 0 16px;
  font-size: var(--font-size-small);
  font-weight: 600;
  opacity: 0.85;
}

body.page-what-if-board .what-if-board-view[hidden] {
  display: none !important;
}

body.page-what-if-board .what-if-board-section {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: none;
  border-radius: var(--radius-card);
  background: var(--panel-nested-fill);
}

body.page-what-if-board .what-if-board-section h2 {
  margin: 0 0 6px;
  font-size: var(--font-size-resource-section);
  font-weight: 700;
  text-align: left;
}

body.page-what-if-board .what-if-board-fixed-title {
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  text-align: center;
}

body.page-what-if-board .what-if-board-section-hint {
  margin: 0;
  font-size: var(--font-size-small);
  line-height: var(--line-height-body);
  opacity: 0.85;
}

body.page-what-if-board .what-if-board-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

body.page-what-if-board .what-if-board-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

body.page-what-if-board .what-if-board-input {
  flex: 1 1 0;
  min-width: 0;
  box-sizing: border-box;
  padding: 10px 12px;
  border: var(--border-subtle);
  border-radius: var(--radius-card);
  background: rgb(255 255 255 / 18%);
  color: inherit;
  font-family: inherit;
  font-size: var(--font-size-body);
  font-weight: 600;
}

body.page-what-if-board .what-if-board-input::placeholder {
  color: rgb(255 255 255 / 42%);
  opacity: 1;
}

body.page-what-if-board .what-if-board-remove-button {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  padding: 0;
  border: var(--border-button);
  border-radius: 50%;
  background: rgb(255 255 255 / 18%);
  color: inherit;
  font-family: inherit;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

body.page-what-if-board .what-if-board-remove-button:hover {
  background: rgb(255 255 255 / 28%);
}

body.page-what-if-board .what-if-board-output-title {
  margin: 0 0 clamp(20px, 4vw, 32px);
  font-size: clamp(1.75rem, 6vw, 2.75rem);
  line-height: 1.1;
  text-align: center;
}

body.page-what-if-board .what-if-board-output-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 42rem;
  margin: 0 auto clamp(24px, 4vw, 36px);
  padding: 0;
  list-style: none;
  counter-reset: what-if-board-item;
}

body.page-what-if-board .what-if-board-output-item {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin: 0;
  padding: 14px 16px 14px 52px;
  border: var(--border-subtle);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-card);
  background: var(--resource-display-card-fill);
  font-size: clamp(1rem, 3.5vw, 1.35rem);
  font-weight: 700;
  line-height: var(--line-height-body);
  text-align: left;
}

body.page-what-if-board .what-if-board-output-condition,
body.page-what-if-board .what-if-board-output-solution {
  flex: 1 1 8rem;
  min-width: 0;
}

body.page-what-if-board .what-if-board-arrow {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1rem;
  color: inherit;
  opacity: 0.92;
}

body.page-what-if-board .what-if-board-arrow svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

body.page-what-if-board .what-if-board-output-item .what-if-board-arrow {
  width: 2.25rem;
  height: 1.15rem;
}

body.page-what-if-board .what-if-board-output-item::before {
  counter-increment: what-if-board-item;
  content: counter(what-if-board-item);
  position: absolute;
  left: 14px;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-text-on-accent);
  font-size: var(--font-size-small);
  transform: translateY(-50%);
}

/* First Next Then page */

body.page-first-next-then {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

body.page-first-next-then.has-site-chrome {
  padding-top: var(--site-header-height);
}

body.page-first-next-then .first-next-then-page-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-height: 0;
  box-sizing: border-box;
  padding: var(--page-body-padding-top) var(--page-panel-gap) var(--page-panel-gap);
}

body.page-first-next-then .first-next-then-shell {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 0;
  width: min(100%, var(--panel-max-wide));
  margin-inline: auto;
  box-sizing: border-box;
}

body.page-first-next-then .first-next-then-card,
body.page-first-next-then .first-next-then-output {
  width: 100%;
  box-sizing: border-box;
  max-height: none;
}

body.page-first-next-then .first-next-then-status {
  margin: 0 0 16px;
  font-size: var(--font-size-small);
  font-weight: 600;
  opacity: 0.85;
}

body.page-first-next-then .first-next-then-view[hidden] {
  display: none;
}

body.page-first-next-then .first-next-then-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

body.page-first-next-then .first-next-then-section-hint {
  margin: 0 0 16px;
  font-size: var(--font-size-small);
  opacity: 0.85;
}

body.page-first-next-then .first-next-then-setup-row,
body.page-first-next-then .first-next-then-display-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

body.page-first-next-then .first-next-then-setup-row {
  margin-bottom: 22px;
  align-items: flex-start;
  overflow-x: auto;
  padding-bottom: 4px;
}

body.page-first-next-then .first-next-then-display-row {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  align-items: center;
  justify-content: center;
}

body.page-first-next-then .first-next-then-card-column {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: 1 1 0;
  min-width: 0;
  max-width: 220px;
}

body.page-first-next-then
  .first-next-then-setup-row[data-card-count="1"]
  .first-next-then-card-column,
body.page-first-next-then
  .first-next-then-setup-row[data-card-count="2"]
  .first-next-then-card-column {
  max-width: 360px;
}

body.page-first-next-then
  .first-next-then-setup-row[data-card-count="3"]
  .first-next-then-card-column {
  max-width: 290px;
}

body.page-first-next-then .first-next-then-add-column {
  flex: 0 0 auto;
  align-self: center;
}

body.page-first-next-then .first-next-then-add-column .resource-instance-add-button {
  --group-header-height: 3.25rem;
  width: var(--group-header-height);
  min-width: var(--group-header-height);
  height: var(--group-header-height);
  margin: 0;
  border-width: 4px;
}

body.page-first-next-then .first-next-then-square {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 160px;
  border: 3px solid rgb(var(--panel-tint-purple) / var(--panel-op-outer));
  border-radius: var(--radius-input);
  background: rgb(var(--panel-tint-purple) / var(--panel-op-outer));
  overflow: hidden;
  box-sizing: border-box;
  color: var(--color-text);
}

body.page-first-next-then .first-next-then-square.is-editing {
  min-height: 280px;
  padding: 12px;
  gap: 12px;
}

body.page-first-next-then .first-next-then-square--display {
  flex: 0 1 auto;
  width: 100%;
  max-width: min(240px, 100%);
  height: auto;
  min-height: 0;
  border-color: rgb(var(--panel-tint-purple) / 92%);
  background: var(--resource-display-card-fill);
}

body.page-first-next-then
  .first-next-then-display-row[data-card-count="1"]
  .first-next-then-square--display,
body.page-first-next-then
  .first-next-then-display-row[data-card-count="2"]
  .first-next-then-square--display {
  max-width: min(360px, 100%);
}

body.page-first-next-then
  .first-next-then-display-row[data-card-count="3"]
  .first-next-then-square--display {
  max-width: min(300px, 100%);
}

body.page-first-next-then .first-next-then-title-panel,
body.page-first-next-then .first-next-then-image-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
}

body.page-first-next-then .first-next-then-title-panel {
  flex: 0 0 auto;
  padding: 8px 10px;
  border-bottom: 2px solid rgb(255 255 255 / 22%);
  background: rgb(var(--panel-tint-purple) / var(--panel-op-strong));
}

body.page-first-next-then .first-next-then-image-panel {
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 1;
  padding: 8px;
  background: var(--panel-nested-fill);
  box-sizing: border-box;
}

body.page-first-next-then .first-next-then-title-text {
  margin: 0;
  font-size: var(--font-size-body);
  font-weight: 700;
  line-height: var(--line-height-title);
  text-align: center;
  color: inherit;
}

body.page-first-next-then .first-next-then-panel-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

body.page-first-next-then .first-next-then-panel-image.grupop-image-frame {
  object-fit: contain;
}

body.page-first-next-then .first-next-then-image-placeholder {
  font-size: var(--font-size-small);
  font-weight: 600;
  opacity: 0.55;
}

body.page-first-next-then .first-next-then-edit-button {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
  min-width: 5.5rem;
}

body.page-first-next-then .first-next-then-square:not(.is-editing):has(.first-next-then-title-panel)
  .first-next-then-edit-button {
  top: auto;
  bottom: 10px;
  transform: translateX(-50%);
  padding: 6px 14px;
  font-size: var(--font-size-small);
}

body.page-first-next-then .first-next-then-remove-button {
  align-self: center;
  margin-top: 8px;
  width: 1.75rem;
  height: 1.75rem;
  border: none;
  border-radius: 50%;
  background: rgb(0 0 0 / 20%);
  color: var(--color-text-on-accent);
  font: inherit;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

body.page-first-next-then .first-next-then-remove-button:hover {
  background: rgb(0 0 0 / 30%);
  color: var(--color-error);
}

body.page-first-next-then .first-next-then-card-editor {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  min-height: 0;
}

body.page-first-next-then .first-next-then-edit-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.page-first-next-then .first-next-then-edit-label {
  margin: 0;
  font-size: var(--font-size-small);
  font-weight: 700;
}

body.page-first-next-then .first-next-then-mode-row {
  display: flex;
  gap: 8px;
}

body.page-first-next-then .first-next-then-mode-button.is-active {
  border-color: var(--color-accent);
  background: rgb(25 244 171 / 22%);
}

body.page-first-next-then .first-next-then-title-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: var(--border-subtle);
  border-radius: var(--radius-input);
  background: rgb(255 255 255 / 18%);
  color: inherit;
  font: inherit;
  font-size: var(--font-size-body);
  font-weight: 600;
}

body.page-first-next-then .first-next-then-title-input::placeholder {
  color: rgb(255 255 255 / 42%);
  opacity: 1;
}

body.page-first-next-then .first-next-then-image-host {
  min-width: 0;
}

body.page-first-next-then .first-next-then-done-button {
  align-self: stretch;
}

/* Phone: browsing stays a swipe row; editing expands to full panel width */
@media (max-width: 700px) {
  body.page-first-next-then .first-next-then-setup-row:not(:has(.is-editing)) {
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  body.page-first-next-then
    .first-next-then-setup-row:not(:has(.is-editing))
    .first-next-then-card-column {
    flex: 0 0 auto;
    width: min(72vw, 240px);
    max-width: min(72vw, 240px);
    scroll-snap-align: start;
  }

  body.page-first-next-then .first-next-then-setup-row:has(.is-editing) {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    overflow-x: visible;
    gap: 12px;
  }

  body.page-first-next-then
    .first-next-then-setup-row:has(.is-editing)
    .first-next-then-card-column:not(:has(.is-editing)),
  body.page-first-next-then
    .first-next-then-setup-row:has(.is-editing)
    .first-next-then-add-column {
    display: none;
  }

  body.page-first-next-then
    .first-next-then-setup-row:has(.is-editing)
    .first-next-then-card-column:has(.is-editing) {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
  }

  body.page-first-next-then .first-next-then-square.is-editing {
    min-height: 0;
  }
}

body.page-first-next-then .first-next-then-output .resource-fullscreen-stage {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

body.page-first-next-then
  .first-next-then-output.resource-fullscreen-target:fullscreen
  .first-next-then-display-row,
body.page-first-next-then
  .first-next-then-output.resource-fullscreen-target:-webkit-full-screen
  .first-next-then-display-row {
  gap: 1.25rem;
}

body.page-first-next-then
  .first-next-then-output.resource-fullscreen-target:fullscreen
  .first-next-then-square--display,
body.page-first-next-then
  .first-next-then-output.resource-fullscreen-target:-webkit-full-screen
  .first-next-then-square--display {
  max-width: min(280px, 22vw);
}

body.page-first-next-then
  .first-next-then-output.resource-fullscreen-target:fullscreen
  .first-next-then-display-row[data-card-count="1"]
  .first-next-then-square--display,
body.page-first-next-then
  .first-next-then-output.resource-fullscreen-target:-webkit-full-screen
  .first-next-then-display-row[data-card-count="1"]
  .first-next-then-square--display,
body.page-first-next-then
  .first-next-then-output.resource-fullscreen-target:fullscreen
  .first-next-then-display-row[data-card-count="2"]
  .first-next-then-square--display,
body.page-first-next-then
  .first-next-then-output.resource-fullscreen-target:-webkit-full-screen
  .first-next-then-display-row[data-card-count="2"]
  .first-next-then-square--display {
  max-width: min(420px, 40vw);
}

body.page-first-next-then
  .first-next-then-output.resource-fullscreen-target:fullscreen
  .first-next-then-display-row[data-card-count="3"]
  .first-next-then-square--display,
body.page-first-next-then
  .first-next-then-output.resource-fullscreen-target:-webkit-full-screen
  .first-next-then-display-row[data-card-count="3"]
  .first-next-then-square--display {
  max-width: min(340px, 28vw);
}

body.page-first-next-then
  .first-next-then-output.resource-fullscreen-target:fullscreen
  .first-next-then-title-text,
body.page-first-next-then
  .first-next-then-output.resource-fullscreen-target:-webkit-full-screen
  .first-next-then-title-text {
  font-size: var(--font-size-title);
}

/* Revision Board page */

body.page-revision-board {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

body.page-revision-board.has-site-chrome {
  padding-top: var(--site-header-height);
}

body.page-revision-board .revision-board-page-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

body.page-revision-board .revision-board-shell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(100%, var(--panel-max-wide));
  margin-inline: auto;
  box-sizing: border-box;
}

body.page-revision-board .revision-board-card,
body.page-revision-board .revision-board-output {
  width: 100%;
  box-sizing: border-box;
  max-height: none;
}

body.page-revision-board .revision-board-status {
  margin: 0 0 16px;
  font-size: var(--font-size-small);
  font-weight: 600;
  opacity: 0.85;
}

body.page-revision-board .revision-board-view[hidden] {
  display: none !important;
}

body.page-revision-board .revision-board-section {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: none;
  border-radius: var(--radius-card);
  background: var(--panel-nested-fill);
}

body.page-revision-board .revision-board-section h2 {
  margin: 0 0 6px;
  font-size: var(--font-size-resource-section);
  font-weight: 700;
  text-align: left;
}

body.page-revision-board .revision-board-section-hint {
  margin: 0 0 12px;
  font-size: var(--font-size-small);
  line-height: var(--line-height-body);
  opacity: 0.85;
}

body.page-revision-board .revision-board-field {
  display: block;
}

body.page-revision-board .revision-board-title-input,
body.page-revision-board .revision-board-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: var(--border-subtle);
  border-radius: var(--radius-card);
  background: rgb(255 255 255 / 18%);
  color: inherit;
  font-family: inherit;
  font-size: var(--font-size-body);
  font-weight: 600;
}

body.page-revision-board .revision-board-image-host {
  margin-top: 8px;
}

body.page-revision-board .revision-board-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

body.page-revision-board .revision-board-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

body.page-revision-board .revision-board-row-content {
  /* Shared .image-field-row: text + add-image on one wrapping line */
  min-width: 0;
}

body.page-revision-board .image-field-row > .revision-board-input {
  width: auto;
}

body.page-revision-board .revision-board-point-image-host {
  width: auto;
}

body.page-revision-board .revision-board-remove-button {
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgb(0 0 0 / 12%);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

body.page-revision-board .revision-board-remove-button:hover {
  background: rgb(255 255 255 / 28%);
}

body.page-revision-board .revision-board-output-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 0 0 clamp(20px, 4vw, 32px);
  font-size: clamp(1.75rem, 6vw, 2.75rem);
  line-height: 1.1;
  text-align: center;
}

body.page-revision-board .revision-board-output-image {
  display: block;
  max-width: min(100%, 480px);
  max-height: 200px;
  border-radius: var(--radius-control);
  object-fit: contain;
}

body.page-revision-board .revision-board-output-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 42rem;
  margin: 0 auto clamp(24px, 4vw, 36px);
  padding: 0;
  list-style: none;
  counter-reset: revision-board-point;
}

body.page-revision-board .revision-board-output-item {
  position: relative;
  display: block;
  margin: 0;
  padding: 14px 16px 14px 52px;
  border: var(--border-subtle);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-card);
  background: var(--resource-display-card-fill);
  font-size: clamp(1rem, 3.5vw, 1.35rem);
  font-weight: 700;
  line-height: var(--line-height-body);
  text-align: left;
}

body.page-revision-board .revision-board-output-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

body.page-revision-board .revision-board-output-point-image {
  display: block;
  align-self: center;
  max-width: min(100%, 360px);
  max-height: 160px;
  border-radius: var(--radius-control);
  object-fit: contain;
}

body.page-revision-board .revision-board-output-item::before {
  counter-increment: revision-board-point;
  content: counter(revision-board-point);
  position: absolute;
  left: 14px;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-text-on-accent);
  font-size: var(--font-size-small);
  transform: translateY(-50%);
}

/* Teacher resource setup: sibling Nested D cards
   Outer shell: title, intro, instance switcher, primary actions.
   Sibling cards: setup work surfaces (create / assign / duration / etc.). */
.resource-setup-siblings {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}

.resource-setup-sibling {
  margin: 0;
  padding: 14px 16px;
  border: none;
  border-radius: var(--radius-card);
  background: var(--panel-nested-fill);
  box-sizing: border-box;
}

.resource-setup-sibling > h2:first-child {
  margin: 0 0 10px;
  font-size: var(--font-size-resource-section);
  font-weight: 700;
  line-height: var(--line-height-tight);
}

.resource-setup-sibling-hint {
  margin: 0 0 14px;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: var(--line-height-body);
  opacity: 0.85;
}

/* Insets that already used Nested D: lighten inside a sibling card */
.resource-setup-sibling .unassigned-pool,
body.page-turn-taking .resource-setup-sibling .turn-taking-queue,
body.page-random-order .resource-setup-sibling .random-order-selection,
body.page-image-library .resource-setup-sibling .image-library-item {
  background: rgb(255 255 255 / 10%);
}

.resource-setup-sibling .quiet-pops-cue-option {
  margin-top: 16px;
}

.resource-setup-siblings + .resource-panel-actions,
.resource-setup-siblings + .jobs-board-actions,
.resource-setup-siblings + .team-builder-actions,
.resource-setup-siblings + .random-order-output-actions {
  margin-top: 16px;
}

/* Resource instance switcher (multi-instance teacher resources) */

.resource-instance-switcher {
  margin-bottom: 16px;
}

.resource-instance-pick-prompt {
  margin: 0 0 8px;
  padding: 20px 16px;
  border: var(--border-subtle);
  border-radius: var(--radius-card);
  color: var(--color-text);
  font-size: var(--font-size-body, 1rem);
  line-height: var(--line-height-body);
  text-align: center;
}

.resource-instance-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
}

.resource-instance-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--color-text);
}

.resource-instance-tab-button {
  display: flex;
  align-items: center;
  max-width: 360px;
  padding: 6px 12px;
  border: var(--border-button);
  border-radius: 999px;
  background: rgb(0 0 0 / 35%);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  color: inherit;
  appearance: none;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.resource-instance-tab.is-active .resource-instance-tab-button {
  border-color: var(--color-accent);
  background: rgb(0 0 0 / 50%);
  box-shadow: 0 0 0 1px rgb(25 244 171 / 35%);
}

.resource-instance-tab-button:hover {
  background: rgb(0 0 0 / 45%);
}

.resource-instance-tab.is-active .resource-instance-tab-button:hover {
  background: rgb(0 0 0 / 55%);
}

.resource-instance-tab-button .resource-rename-label {
  display: block;
  min-width: 0;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-instance-tab-button .resource-rename-label.is-editing {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.resource-instance-tab-button .resource-rename-text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-instance-tab-button .resource-rename-text[hidden],
.resource-instance-tab-button .resource-rename-input[hidden],
.group-header .resource-rename-text[hidden],
.group-header .resource-rename-input[hidden] {
  display: none !important;
}

.resource-instance-tab-button .resource-rename-input,
.resource-instance-label-input {
  width: 100%;
  min-width: 72px;
  max-width: 280px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  font: inherit;
  font-weight: 600;
  color: inherit;
  caret-color: var(--caret-color);
  cursor: var(--cursor-text);
}

.resource-instance-tab-button .resource-rename-input:focus,
.resource-instance-label-input:hover,
.resource-instance-label-input:focus {
  border-color: transparent;
  background: transparent;
  outline: none;
}

.resource-rename-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgb(0 0 0 / 55%);
  color: #fff;
  box-shadow: 0 0 0 2px rgb(255 255 255 / 70%);
  cursor: pointer;
  appearance: none;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.resource-rename-button:hover {
  background: rgb(0 0 0 / 72%);
  color: #fff;
  box-shadow: 0 0 0 2px #fff;
}

.resource-rename-icon {
  display: block;
  width: 20px;
  height: 20px;
}

.resource-rename-icon path {
  stroke-width: 1.85;
}

.resource-instance-tab-button.has-colour {
  background: color-mix(in srgb, var(--instance-colour) 38%, rgb(0 0 0 / 42%));
  border-color: color-mix(in srgb, var(--instance-colour) 65%, rgb(255 255 255 / 25%));
}

.resource-instance-tab-button.has-colour:hover {
  background: color-mix(in srgb, var(--instance-colour) 48%, rgb(0 0 0 / 38%));
}

.resource-instance-tab.is-active .resource-instance-tab-button.has-colour {
  background: color-mix(in srgb, var(--instance-colour) 52%, rgb(0 0 0 / 35%));
  border-color: var(--instance-colour);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--instance-colour) 55%, transparent);
}

.resource-instance-tab.is-active .resource-instance-tab-button.has-colour:hover {
  background: color-mix(in srgb, var(--instance-colour) 58%, rgb(0 0 0 / 30%));
}

.resource-instance-menu-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgb(0 0 0 / 35%);
  color: rgb(255 255 255 / 75%);
  cursor: pointer;
  appearance: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.resource-instance-menu-button svg {
  display: block;
  width: 16px;
  height: 16px;
}

.resource-instance-menu-button:hover,
.resource-instance-menu-button[aria-expanded="true"] {
  background: rgb(0 0 0 / 50%);
  color: rgb(255 255 255 / 95%);
}

.resource-instance-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 40;
  min-width: 11.5rem;
  padding: 6px;
  border: var(--border-subtle);
  border-radius: 12px;
  background: rgb(18 36 22 / 96%);
  box-shadow: 0 10px 28px rgb(0 0 0 / 45%);
}

.resource-instance-menu > button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 9px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.resource-instance-menu > button:hover:not(:disabled) {
  background: rgb(255 255 255 / 12%);
}

.resource-instance-menu > button:disabled {
  opacity: 0.4;
  cursor: default;
}

.resource-instance-menu > button.is-danger {
  color: #ffb4b4;
}

.resource-instance-menu > button.is-danger:hover:not(:disabled) {
  background: rgb(255 80 80 / 18%);
}

.resource-instance-menu-divider {
  height: 1px;
  margin: 4px 6px;
  background: rgb(255 255 255 / 16%);
}

.resource-instance-menu-heading {
  padding: 6px 10px 2px;
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0.7;
}

.resource-instance-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 6px 8px;
}

.resource-instance-swatch {
  box-sizing: border-box;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  padding: 0;
  border: 2px solid rgb(255 255 255 / 35%);
  border-radius: 50%;
  cursor: pointer;
  appearance: none;
}

.resource-instance-swatch.is-none {
  background: repeating-conic-gradient(#666 0% 25%, #333 0% 50%) 50% / 10px 10px;
}

.resource-instance-swatch.is-selected {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgb(25 244 171 / 55%);
}

.resource-instance-delete-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgb(0 0 0 / 35%);
  font: inherit;
  font-size: 1.25rem;
  line-height: 1;
  color: rgb(255 255 255 / 70%);
  cursor: pointer;
  appearance: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.resource-instance-delete-button:hover {
  background: rgb(0 0 0 / 30%);
  color: var(--color-error);
}

.resource-instance-add-button {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  width: auto;
  min-width: 2.25rem;
  height: auto;
  aspect-ratio: 1;
  margin-left: 7px; /* with 8px flex gap ≈ 15px from last tab */
  padding: 0;
  border: 2px solid var(--color-accent);
  border-radius: 50%;
  background: rgb(0 0 0 / 35%);
  font: inherit;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  color: var(--color-accent);
  cursor: pointer;
  appearance: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.resource-instance-add-button:hover {
  background: rgb(25 244 171 / 22%);
  border-color: var(--color-accent-hover);
  color: var(--color-accent-hover);
}

/* Team builder page */

body.page-team-builder {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

body.page-team-builder.has-site-chrome {
  padding-top: var(--site-header-height);
}

body.page-team-builder .team-builder-page-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

body.page-team-builder .team-builder-shell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
  width: min(100%, var(--panel-max-wide));
  margin-inline: auto;
  box-sizing: border-box;
}

body.page-team-builder .team-builder-card,
body.page-team-builder .team-builder-output-card {
  width: 100%;
  box-sizing: border-box;
  max-height: none;
}

body.page-team-builder .team-builder-status {
  margin: 0 0 16px;
  font-size: var(--font-size-small);
  font-weight: 600;
  opacity: 0.85;
}

body.page-team-builder .team-builder-config-warning,
body.page-jobs-board .team-builder-config-warning,
body.page-revision-board .team-builder-config-warning,
body.page-pop-pal-prompts .team-builder-config-warning,
body.page-group-checklist .team-builder-config-warning,
body.page-what-if-board .team-builder-config-warning,
body.page-first-next-then .team-builder-config-warning,
body.page-turn-taking .team-builder-config-warning,
body.page-random-order .team-builder-config-warning,
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgb(255 244 229);
  border: 1px solid rgb(247 178 75);
  color: var(--color-text-on-accent);
}

body.page-team-builder .team-builder-config-warning p,
body.page-jobs-board .team-builder-config-warning p,
body.page-revision-board .team-builder-config-warning p,
body.page-pop-pal-prompts .team-builder-config-warning p,
body.page-group-checklist .team-builder-config-warning p,
body.page-what-if-board .team-builder-config-warning p,
body.page-first-next-then .team-builder-config-warning p,
body.page-turn-taking .team-builder-config-warning p,
body.page-random-order .team-builder-config-warning p,
  margin: 0 0 10px;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: 1.45;
  color: inherit;
}

body.page-team-builder .team-builder-config-warning .edit-cancel-button,
body.page-jobs-board .team-builder-config-warning .edit-cancel-button,
body.page-revision-board .team-builder-config-warning .edit-cancel-button,
body.page-pop-pal-prompts .team-builder-config-warning .edit-cancel-button,
body.page-group-checklist .team-builder-config-warning .edit-cancel-button,
body.page-what-if-board .team-builder-config-warning .edit-cancel-button,
body.page-first-next-then .team-builder-config-warning .edit-cancel-button,
body.page-turn-taking .team-builder-config-warning .edit-cancel-button,
body.page-random-order .team-builder-config-warning .edit-cancel-button,
  flex: 0 0 auto;
  width: auto;
  color: var(--color-text-on-accent);
  background: rgb(26 46 26 / 8%);
  border: 1px solid rgb(26 46 26 / 28%);
}

body.page-team-builder .team-builder-config-warning .edit-cancel-button:hover:not(:disabled),
body.page-jobs-board .team-builder-config-warning .edit-cancel-button:hover:not(:disabled),
body.page-revision-board .team-builder-config-warning .edit-cancel-button:hover:not(:disabled),
body.page-pop-pal-prompts .team-builder-config-warning .edit-cancel-button:hover:not(:disabled),
body.page-group-checklist .team-builder-config-warning .edit-cancel-button:hover:not(:disabled),
body.page-what-if-board .team-builder-config-warning .edit-cancel-button:hover:not(:disabled),
body.page-first-next-then .team-builder-config-warning .edit-cancel-button:hover:not(:disabled),
body.page-turn-taking .team-builder-config-warning .edit-cancel-button:hover:not(:disabled),
body.page-random-order .team-builder-config-warning .edit-cancel-button:hover:not(:disabled),
  background: rgb(26 46 26 / 14%);
}

body.page-team-builder .team-builder-view[hidden] {
  display: none !important;
}

body.page-team-builder .team-builder-groups-section {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: none;
  border-radius: var(--radius-card);
  background: var(--panel-nested-fill);
}

body.page-team-builder .resource-pickers-row:has(.unassigned-pool.is-collapsed) .resource-pickers-groups {
  width: 100%;
  flex: 1 1 auto;
}

body.page-team-builder .resource-pickers-row:has(.unassigned-pool.is-collapsed) .team-builder-group-chips {
  flex-direction: row;
  flex-wrap: wrap;
}

body.page-team-builder .resource-pickers-row:has(.unassigned-pool.is-collapsed) .team-builder-group-chip {
  width: auto;
}

body.page-team-builder .team-builder-groups-section h2 {
  margin: 0 0 8px;
  font-size: var(--font-size-resource-section);
  font-weight: 700;
  line-height: var(--line-height-tight);
}

body.page-team-builder .team-builder-section-hint {
  margin: 0 0 12px;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: var(--line-height-body);
  opacity: 0.85;
}

body.page-team-builder .team-builder-group-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 40px;
}

body.page-team-builder .team-builder-group-chip {
  padding: 8px 14px;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  color: #fff;
  font-family: inherit;
  font-size: var(--font-size-small);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease;
}

body.page-team-builder .team-builder-group-chip:hover {
  transform: translateY(-1px);
}

body.page-team-builder .team-builder-output-intro {
  margin: 0 0 20px;
  font-size: var(--font-size-body);
  font-weight: 600;
  text-align: center;
  opacity: 0.85;
}

body.page-team-builder .team-builder-output-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
  overflow-x: visible;
  padding-bottom: 8px;
}

body.page-team-builder .team-builder-output-column {
  flex: 1 1 200px;
  min-width: min(200px, 100%);
  max-width: 100%;
}

body.page-team-builder .team-builder-output-heading {
  margin: 0 0 12px;
  padding: 12px 10px;
  border-radius: var(--radius-input);
  font-size: var(--font-size-body);
  font-weight: 700;
  line-height: var(--line-height-tight);
  text-align: center;
  color: var(--color-text-on-accent);
}

body.page-team-builder .team-builder-output-pupils {
  flex: 1 1 auto;
  align-content: flex-start;
  margin: 0;
  padding: 10px;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: var(--radius-input);
  background: var(--panel-nested-fill);
  min-height: 80px;
}

body.page-team-builder .team-builder-output-pupils.is-empty::before {
  content: "No pupils yet";
  display: block;
  width: 100%;
  padding: 8px 0;
  font-size: var(--font-size-small);
  font-weight: 600;
  text-align: center;
  opacity: 0.72;
}

/* Group Checklist page */

body.page-group-checklist {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

body.page-group-checklist.has-site-chrome {
  padding-top: var(--site-header-height);
}

body.page-group-checklist .group-checklist-page-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

body.page-group-checklist .group-checklist-shell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
  width: min(100%, var(--panel-max-wide));
  margin-inline: auto;
  box-sizing: border-box;
}

body.page-group-checklist .group-checklist-card,
body.page-group-checklist .group-checklist-output-card {
  width: 100%;
  box-sizing: border-box;
  max-height: none;
}

body.page-group-checklist .group-checklist-status {
  margin: 0 0 16px;
  font-size: var(--font-size-small);
  font-weight: 600;
  opacity: 0.85;
}

body.page-group-checklist .group-checklist-view[hidden] {
  display: none !important;
}

body.page-group-checklist .group-checklist-section-divider {
  margin: 8px 0 22px;
  border: 0;
  border-top: 1px solid rgb(255 255 255 / 28%);
}

body.page-group-checklist #groups-section-heading {
  margin: 0 0 8px;
  font-size: var(--font-size-resource-section);
  font-weight: 700;
  line-height: var(--line-height-tight);
}

body.page-group-checklist .group-checklist-output-teams-heading {
  margin: 0 0 10px;
  font-size: clamp(1.05rem, 2.4vw, 1.4rem);
  font-weight: 700;
  text-align: center;
}

body.page-group-checklist .group-checklist-output-card.resource-fullscreen-target {
  max-height: none;
}

body.page-group-checklist .group-checklist-output-card:not([hidden]):not(:fullscreen):not(:-webkit-full-screen),
body.page-group-checklist .group-checklist-output-card:fullscreen,
body.page-group-checklist .group-checklist-output-card:-webkit-full-screen {
  overflow: hidden;
}

body.page-group-checklist .group-checklist-output-card .resource-fullscreen-stage {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: safe center;
  gap: 0;
  min-height: 0;
  overflow: hidden;
}

body.page-group-checklist .group-checklist-output-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: clamp(12px, 2vw, 20px);
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow: hidden;
}

body.page-group-checklist .group-checklist-output-checklist,
body.page-group-checklist .group-checklist-output-groups {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

body.page-group-checklist .group-checklist-output-groups {
  justify-content: flex-start;
}

body.page-group-checklist .pop-pal-prompts-section {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: none;
  border-radius: var(--radius-card);
  background: var(--panel-nested-fill);
}

body.page-group-checklist .pop-pal-prompts-section h2 {
  margin: 0 0 12px;
  font-size: var(--font-size-resource-section);
  font-weight: 700;
  line-height: var(--line-height-tight);
}

body.page-group-checklist .pop-pal-prompts-section-hint {
  margin: 0 0 12px;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: var(--line-height-body);
  opacity: 0.85;
}

body.page-group-checklist .pop-pal-prompts-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: var(--border-subtle);
  border-radius: var(--radius-card);
  background: rgb(255 255 255 / 18%);
  color: inherit;
  font-family: inherit;
  font-size: var(--font-size-body);
  font-weight: 600;
}

body.page-group-checklist .pop-pal-prompts-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

body.page-group-checklist .pop-pal-prompts-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

body.page-group-checklist .pop-pal-prompts-row-content {
  min-width: 0;
}

body.page-group-checklist .image-field-row > .pop-pal-prompts-input {
  width: auto;
}

body.page-group-checklist .pop-pal-prompts-remove-button {
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgb(0 0 0 / 12%);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

body.page-group-checklist .pop-pal-prompts-remove-button:hover {
  background: rgb(255 255 255 / 28%);
}

body.page-group-checklist .pop-pal-prompts-output-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: clamp(1.25rem, 3.2vw, 1.85rem);
  line-height: 1.1;
  text-align: center;
}

body.page-group-checklist .pop-pal-prompts-output-image {
  display: block;
  max-width: min(100%, 220px);
  max-height: 88px;
  border-radius: var(--radius-control);
  object-fit: contain;
}

body.page-group-checklist .pop-pal-prompts-output-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: none;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
  counter-reset: group-checklist-prompt;
  min-height: 0;
  overflow: hidden;
}

body.page-group-checklist .pop-pal-prompts-output-item {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 10px 8px 40px;
  border: var(--border-subtle);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-card);
  background: var(--resource-display-card-fill);
  font-size: clamp(0.85rem, 1.8vw, 1.05rem);
  font-weight: 700;
  line-height: var(--line-height-body);
  text-align: left;
}

body.page-group-checklist .pop-pal-prompts-output-item > span {
  flex: 1 1 auto;
  min-width: 0;
}

body.page-group-checklist .pop-pal-prompts-output-item::before {
  counter-increment: group-checklist-prompt;
  content: counter(group-checklist-prompt);
  position: absolute;
  top: 50%;
  left: 10px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-text-on-accent);
  font-size: 0.75rem;
  font-weight: 800;
  transform: translateY(-50%);
}

body.page-group-checklist .pop-pal-prompts-output-prompt-image {
  display: block;
  flex: 0 0 auto;
  width: auto;
  max-width: min(42%, 96px);
  max-height: 48px;
  border-radius: var(--radius-control);
  object-fit: contain;
}

body.page-group-checklist .pop-pal-prompts-output-wagoll {
  width: 100%;
  max-width: none;
  margin: 0;
  text-align: center;
  min-height: 0;
}

body.page-group-checklist .pop-pal-prompts-output-wagoll-image {
  display: block;
  width: 100%;
  max-width: min(100%, 160px);
  max-height: min(16vh, 120px);
  margin: 0 auto;
  border: var(--border-subtle);
  border-radius: var(--radius-card);
  object-fit: contain;
}

body.page-group-checklist .team-builder-groups-section {
  margin-bottom: 0;
  padding: 12px 14px;
  border: none;
  border-radius: var(--radius-card);
  background: var(--panel-nested-fill);
}

body.page-group-checklist .team-builder-groups-section h2 {
  margin: 0 0 8px;
  font-size: var(--font-size-resource-section);
  font-weight: 700;
}

body.page-group-checklist .team-builder-section-hint {
  margin: 0 0 10px;
  font-size: var(--font-size-small);
  font-weight: 600;
  opacity: 0.85;
}

body.page-group-checklist .team-builder-group-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.page-group-checklist .team-builder-group-chip {
  padding: 8px 12px;
  border: none;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  color: var(--color-text-on-accent);
}

body.page-group-checklist .team-builder-group-chip:hover {
  filter: brightness(1.06);
}

body.page-group-checklist .resource-pickers-row:has(.unassigned-pool.is-collapsed) .resource-pickers-groups {
  width: auto;
  flex: 1 1 auto;
}

body.page-group-checklist .team-builder-output-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  width: 100%;
  flex: 1 1 auto;
  align-content: start;
  min-height: 0;
  overflow: hidden;
}

body.page-group-checklist .team-builder-output-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

body.page-group-checklist .team-builder-output-heading {
  margin: 0 0 6px;
  padding: 8px 10px;
  border-radius: var(--radius-input);
  font-size: clamp(0.85rem, 1.7vw, 1.05rem);
  font-weight: 700;
  line-height: var(--line-height-tight);
  text-align: center;
  color: var(--color-text-on-accent);
}

body.page-group-checklist .team-builder-output-pupils {
  flex: 1 1 auto;
  align-content: flex-start;
  margin: 0;
  padding: 8px;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: var(--radius-input);
  background: var(--panel-nested-fill);
  min-height: 56px;
  overflow: hidden;
}

body.page-group-checklist .team-builder-output-pupils .pupil-chip {
  padding: 4px 8px;
  font-size: clamp(0.75rem, 1.4vw, 0.9rem);
}

body.page-group-checklist .group-checklist-output-card:fullscreen .pupil-chip,
body.page-group-checklist .group-checklist-output-card:-webkit-full-screen .pupil-chip {
  padding: 4px 8px;
}

body.page-group-checklist .team-builder-output-pupils.is-empty::before {
  content: "No pupils yet";
  display: block;
  width: 100%;
  padding: 8px 0;
  font-size: var(--font-size-small);
  font-weight: 600;
  text-align: center;
  opacity: 0.72;
}

body.page-group-checklist .group-checklist-output-card:not([hidden]) .team-builder-output-row {
  flex: 1 1 auto;
  align-content: start;
  min-height: 0;
}

@media (max-width: 700px) {
  body.page-group-checklist .group-checklist-output-layout {
    grid-template-columns: 1fr;
  }
}

/* Jobs board page */

body.page-jobs-board {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

body.page-jobs-board.has-site-chrome {
  padding-top: var(--site-header-height);
}

body.page-jobs-board .jobs-board-page-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

body.page-jobs-board .jobs-board-shell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(100%, var(--panel-max-wide));
  margin-inline: auto;
  box-sizing: border-box;
}

body.page-jobs-board .jobs-board-card,
body.page-jobs-board .jobs-board-output-card {
  width: 100%;
  box-sizing: border-box;
  max-height: none;
}

body.page-jobs-board .jobs-board-status {
  margin: 0 0 16px;
  font-size: var(--font-size-small);
  font-weight: 600;
  opacity: 0.85;
}

body.page-jobs-board .jobs-board-view[hidden] {
  display: none !important;
}

body.page-jobs-board .jobs-board-groups-section {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: none;
  border-radius: var(--radius-card);
  background: var(--panel-nested-fill);
}

body.page-jobs-board .resource-pickers-row:has(.unassigned-pool.is-collapsed) .resource-pickers-groups {
  width: 100%;
  flex: 1 1 auto;
}

body.page-jobs-board .resource-pickers-row:has(.unassigned-pool.is-collapsed) .jobs-board-group-chips {
  flex-direction: row;
  flex-wrap: wrap;
}

body.page-jobs-board .resource-pickers-row:has(.unassigned-pool.is-collapsed) .jobs-board-group-chip {
  width: auto;
}

body.page-jobs-board .jobs-board-groups-section h2 {
  margin: 0 0 8px;
  font-size: var(--font-size-resource-section);
  font-weight: 700;
  line-height: var(--line-height-tight);
}

body.page-jobs-board .jobs-board-section-hint {
  margin: 0 0 12px;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: var(--line-height-body);
  opacity: 0.85;
}

body.page-jobs-board .jobs-board-group-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 40px;
}

body.page-jobs-board .jobs-board-group-chip {
  padding: 8px 14px;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  color: #fff;
  font-family: inherit;
  font-size: var(--font-size-small);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease;
}

body.page-jobs-board .jobs-board-group-chip:hover {
  transform: translateY(-1px);
}

body.page-jobs-board .jobs-board-output-intro {
  margin: 0 0 20px;
  font-size: var(--font-size-body);
  font-weight: 600;
  line-height: var(--line-height-body);
  opacity: 0.9;
}

body.page-jobs-board .jobs-board-output-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  align-items: start;
}

body.page-jobs-board .jobs-board-output-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.page-jobs-board .jobs-board-output-heading {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--radius-card);
  color: #fff;
  font-size: var(--font-size-body);
  font-weight: 700;
  line-height: var(--line-height-tight);
  text-align: center;
}

body.page-jobs-board .jobs-board-output-pupils {
  align-content: flex-start;
  margin: 0;
  padding: 10px;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: var(--radius-input);
  background: var(--panel-nested-fill);
  min-height: 80px;
}

body.page-jobs-board .jobs-board-output-pupils.is-empty::before {
  content: "No pupils assigned";
  display: block;
  width: 100%;
  padding: 8px 0;
  font-size: var(--font-size-small);
  font-weight: 600;
  text-align: center;
  opacity: 0.72;
}

/* Image library page */

body.page-image-library {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

body.page-image-library.has-site-chrome {
  padding-top: var(--site-header-height);
}

body.page-image-library .image-library-page-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

body.page-image-library .image-library-shell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(100%, var(--panel-max-wide));
  margin-inline: auto;
  box-sizing: border-box;
}

body.page-image-library .image-library-card {
  width: 100%;
  box-sizing: border-box;
  max-height: none;
}

body.page-image-library .image-library-status,
body.page-image-library .image-library-upload-status {
  margin: 0 0 16px;
  font-size: var(--font-size-small);
  font-weight: 600;
  opacity: 0.85;
}

body.page-image-library .image-library-status.is-success,
body.page-image-library .image-library-upload-status.is-success {
  color: var(--color-accent);
  opacity: 1;
}

body.page-image-library .image-library-status.is-error,
body.page-image-library .image-library-upload-status.is-error {
  color: var(--color-error);
  opacity: 1;
}

body.page-image-library .image-library-status.is-warning,
body.page-image-library .image-library-upload-status.is-warning {
  color: var(--color-warning);
  opacity: 1;
}

body.page-image-library .image-library-summary {
  margin-bottom: 16px;
}

body.page-image-library .image-library-counter {
  margin: 0 0 8px;
  font-size: var(--font-size-body);
  font-weight: 700;
}

body.page-image-library .image-library-hint {
  margin: 0;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: var(--line-height-body);
  opacity: 0.85;
}

body.page-image-library .image-library-actions.resource-panel-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  margin-bottom: 16px;
}

body.page-image-library .image-library-actions.resource-panel-actions > .continue-button {
  flex: 1 1 auto;
  width: auto;
  max-width: none;
}

body.page-image-library .image-library-actions.resource-panel-actions > .edit-cancel-button,
body.page-image-library .image-library-actions.resource-panel-actions > .quiet-button {
  flex: 0 1 auto;
  width: auto;
  max-width: none;
}

body.page-image-library .image-library-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

body.page-image-library .image-library-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 20px 16px;
  border: none;
  border-radius: var(--radius-card);
  background: var(--panel-nested-fill);
  text-align: center;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: var(--line-height-body);
  opacity: 0.9;
}

body.page-image-library .image-library-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: none;
  border-radius: var(--radius-card);
  background: var(--panel-nested-fill);
}

body.page-image-library .image-library-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-card);
  background: rgb(0 0 0 / 12%);
}

body.page-image-library .image-library-thumb.is-load-failed {
  opacity: 0.35;
}

body.page-image-library .image-library-item-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

body.page-image-library .image-library-filename {
  margin: 0;
  font-size: var(--font-size-small);
  font-weight: 700;
  line-height: var(--line-height-tight);
  word-break: break-word;
  color: #fff;
}

body.page-image-library .image-library-date {
  margin: 0;
  font-size: var(--font-size-small);
  font-weight: 600;
  opacity: 0.8;
}

body.page-image-library .image-library-delete-button {
  width: 100%;
  margin-top: 4px;
}

/* Quiet countdown page */

body.page-quiet-countdown {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

body.page-quiet-countdown.has-site-chrome {
  padding-top: var(--site-header-height);
}

body.page-quiet-countdown .quiet-countdown-page-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

body.page-quiet-countdown .quiet-countdown-shell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(100%, var(--panel-max-wide));
  margin-inline: auto;
  box-sizing: border-box;
}

body.page-quiet-countdown .quiet-countdown-card,
body.page-quiet-countdown .quiet-countdown-display {
  width: 100%;
  box-sizing: border-box;
  max-height: none;
}

body.page-quiet-countdown .quiet-countdown-view[hidden] {
  display: none !important;
}

body.page-quiet-countdown .quiet-countdown-section {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: none;
  border-radius: var(--radius-card);
  background: var(--panel-nested-fill);
}

body.page-quiet-countdown .quiet-countdown-section h2 {
  margin: 0 0 12px;
  font-size: var(--font-size-resource-section);
  font-weight: 700;
  line-height: var(--line-height-tight);
}

body.page-quiet-countdown .quiet-countdown-duration-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

body.page-quiet-countdown .quiet-countdown-duration {
  margin: 0;
  font-size: var(--font-size-body);
  font-weight: 700;
}

body.page-quiet-countdown .quiet-countdown-slider {
  width: 100%;
  accent-color: var(--group-color-4);
  cursor: pointer;
}

body.page-quiet-countdown .quiet-countdown-display {
  padding: clamp(20px, 4vw, 36px);
  border: none;
  border-radius: var(--radius-card);
  background: var(--panel-nested-fill);
  text-align: center;
}

body.page-quiet-countdown .quiet-countdown-heading {
  margin: 0 0 clamp(12px, 2vw, 20px);
  font-size: clamp(1.75rem, 6vw, 2.5rem);
  line-height: 1.1;
}

body.page-quiet-countdown .quiet-countdown-status-line {
  margin: 0 0 clamp(16px, 3vw, 24px);
  font-size: var(--font-size-body);
  font-weight: 600;
  opacity: 0.85;
}

body.page-quiet-countdown .quiet-countdown-noisometer,
body.page-quiet-pops .quiet-pops-section {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: none;
  border-radius: var(--radius-card);
  background: var(--panel-nested-fill);
}

body.page-quiet-pops .quiet-pops-section h2 {
  margin: 0 0 12px;
  font-size: var(--font-size-resource-section);
  font-weight: 700;
  line-height: var(--line-height-tight);
}

body.page-quiet-pops .quiet-countdown-duration-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

body.page-quiet-pops .quiet-countdown-duration {
  margin: 0;
  font-size: var(--font-size-body);
  font-weight: 700;
}

body.page-quiet-pops .quiet-countdown-slider {
  width: 100%;
  accent-color: var(--group-color-4);
  cursor: pointer;
}

body.page-quiet-pops .quiet-countdown-noisometer {
  margin: 0 auto clamp(16px, 3vw, 28px);
  max-width: 120px;
}

body.page-quiet-countdown .quiet-countdown-noisometer[hidden] {
  display: none !important;
}

body.page-quiet-countdown .quiet-countdown-noisometer-label,
body.page-quiet-pops .quiet-countdown-noisometer-label {
  margin: 0 0 10px;
  font-size: var(--font-size-small);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
}

body.page-quiet-countdown .quiet-countdown-traffic-lights,
body.page-quiet-pops .quiet-countdown-traffic-lights {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border: 3px solid rgb(255 255 255 / 35%);
  border-radius: 20px;
  background: rgb(0 0 0 / 28%);
}

body.page-quiet-countdown .quiet-countdown-light,
body.page-quiet-pops .quiet-countdown-light {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgb(255 255 255 / 22%);
  background: rgb(255 255 255 / 10%);
  box-shadow: inset 0 2px 6px rgb(0 0 0 / 35%);
  transition: background 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  opacity: 0.35;
}

body.page-quiet-countdown .quiet-countdown-light--red.is-active,
body.page-quiet-pops .quiet-countdown-light--red.is-active {
  opacity: 1;
  background: #e05a5a;
  border-color: rgb(255 255 255 / 45%);
  box-shadow:
    inset 0 2px 6px rgb(0 0 0 / 25%),
    0 0 18px rgb(224 90 90 / 75%);
}

body.page-quiet-countdown .quiet-countdown-light--amber.is-active,
body.page-quiet-pops .quiet-countdown-light--amber.is-active {
  opacity: 1;
  background: var(--group-color-3);
  border-color: rgb(255 255 255 / 45%);
  box-shadow:
    inset 0 2px 6px rgb(0 0 0 / 25%),
    0 0 18px rgb(232 184 109 / 75%);
}

body.page-quiet-countdown .quiet-countdown-light--green.is-active,
body.page-quiet-pops .quiet-countdown-light--green.is-active {
  opacity: 1;
  background: var(--group-color-2);
  border-color: rgb(255 255 255 / 45%);
  box-shadow:
    inset 0 2px 6px rgb(0 0 0 / 25%),
    0 0 18px rgb(168 212 138 / 75%);
}

body.page-quiet-countdown .quiet-countdown-noisometer-hint,
body.page-quiet-pops .quiet-countdown-noisometer-hint {
  margin: 10px 0 0;
  min-height: 1.25rem;
  font-size: var(--font-size-small);
  font-weight: 600;
  opacity: 0.85;
}

body.page-quiet-pops .quiet-pops-cue-option {
  margin: 4px 0 18px;
}

body.page-quiet-pops .quiet-pops-award-cue {
  margin: 16px 0 0;
  font-size: clamp(2.5rem, 10vw, 4.5rem);
  font-weight: 700;
  line-height: 1;
  text-align: center;
  color: var(--color-cauldron-green);
  letter-spacing: 0.02em;
  -webkit-text-stroke: 0.05em #fff;
  paint-order: stroke fill;
  text-shadow: var(--shadow-text);
}

body.page-quiet-pops .quiet-pops-award-cue[hidden] {
  display: none !important;
}

body.page-quiet-countdown .quiet-countdown-noisometer-hint.is-error,
body.page-quiet-pops .quiet-countdown-noisometer-hint.is-error {
  color: var(--color-error);
  opacity: 1;
}

body.page-quiet-countdown .quiet-countdown-countdown-wrap {
  position: relative;
  width: min(72vw, 280px);
  height: min(72vw, 280px);
  margin: 0 auto clamp(12px, 2vw, 20px);
}

body.page-quiet-countdown .quiet-countdown-countdown-arc {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

body.page-quiet-countdown .quiet-countdown-countdown-track {
  fill: none;
  stroke: rgb(201 160 220 / 35%);
  stroke-width: 10;
}

body.page-quiet-countdown .quiet-countdown-countdown-progress {
  fill: none;
  stroke: var(--group-color-4);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke 0.3s ease;
}

body.page-quiet-countdown .quiet-countdown-countdown-progress.is-amber {
  stroke: var(--group-color-3);
}

body.page-quiet-countdown .quiet-countdown-countdown-progress.is-red {
  stroke: #e05a5a;
}

body.page-quiet-countdown .quiet-countdown-countdown-number {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(2rem, 8vw, 3.5rem);
  font-weight: 700;
  line-height: 1;
}

/* Quiet pops page */

body.page-quiet-pops {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

body.page-quiet-pops.has-site-chrome {
  padding-top: var(--site-header-height);
}

body.page-quiet-pops .quiet-pops-page-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

body.page-quiet-pops .quiet-pops-shell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(100%, var(--panel-max-wide));
  margin-inline: auto;
  box-sizing: border-box;
}

body.page-quiet-pops .quiet-pops-card,
body.page-quiet-pops .quiet-pops-display {
  width: 100%;
  box-sizing: border-box;
  max-height: none;
}

body.page-quiet-pops .quiet-pops-view[hidden] {
  display: none !important;
}

body.page-quiet-pops .quiet-pops-status {
  margin: 0 0 16px;
  font-size: var(--font-size-body);
  color: var(--color-text-muted);
}

body.page-quiet-pops .quiet-pops-display {
  text-align: center;
}

body.page-quiet-pops .quiet-pops-status-line {
  margin: 0 0 24px;
  font-size: var(--font-size-body);
  line-height: 1.5;
  color: var(--color-text-muted);
}

/* Class schedule page */

body.page-class-schedule {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

body.page-class-schedule.has-site-chrome {
  padding-top: var(--site-header-height);
}

body.page-class-schedule .class-schedule-page-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

body.page-class-schedule .class-schedule-shell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(100%, var(--panel-max-wide));
  margin-inline: auto;
  box-sizing: border-box;
}

body.page-class-schedule .class-schedule-card {
  width: 100%;
  box-sizing: border-box;
  max-height: none;
}

body.page-class-schedule .class-schedule-back,
body.page-class-schedule .class-schedule-link-button {
  text-decoration: none;
  text-align: center;
  width: auto;
}

body.page-class-schedule .class-schedule-toolbar {
  position: relative;
  margin-bottom: 12px;
}

body.page-class-schedule .class-schedule-toolbar .class-schedule-link-button {
  width: auto;
  padding: 6px 12px;
  font-size: var(--font-size-small);
}

/* Desktop: pin Class display beside the centred title without overlapping it */
@media (min-width: 701px) {
  body.page-class-schedule .class-schedule-toolbar {
    padding-inline: 7.5rem;
  }

  body.page-class-schedule .class-schedule-toolbar .class-schedule-link-button {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
  }
}

/* Narrow screens: stack below the title (toolbar is already column flex) */
@media (max-width: 700px) {
  body.page-class-schedule .class-schedule-toolbar {
    gap: 8px;
  }
}

body.page-class-schedule .resource-page-intro {
  margin-bottom: 12px;
}

body.page-class-schedule .class-schedule-display-intro {
  margin: 0 0 20px;
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  opacity: 0.9;
}

body.page-class-schedule .class-schedule-status {
  margin: 0 0 12px;
  font-size: var(--font-size-small);
  font-weight: 600;
  opacity: 0.9;
}

body.page-class-schedule .class-schedule-status.is-success {
  color: var(--color-accent);
  opacity: 1;
}

body.page-class-schedule .class-schedule-status.is-error {
  color: var(--color-error);
  opacity: 1;
}

body.page-class-schedule .class-schedule-status.is-warning {
  color: var(--color-warning);
  opacity: 1;
}

body.page-class-schedule .class-schedule-status[hidden] {
  display: none !important;
}

body.page-class-schedule .class-schedule-view-toggle {
  display: inline-flex;
  gap: 8px;
  margin-bottom: 8px;
  padding: 4px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--panel-nested-fill);
}

body.page-class-schedule .class-schedule-view-button {
  padding: 6px 14px;
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: var(--font-size-small);
  font-weight: 700;
  cursor: pointer;
}

body.page-class-schedule .class-schedule-view-button.is-active {
  background: var(--color-accent);
  color: var(--color-text-on-accent);
}

body.page-class-schedule .class-schedule-week-nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 12px;
}

body.page-class-schedule .class-schedule-week-nav-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

body.page-class-schedule .class-schedule-week-label {
  margin: 0;
  font-size: var(--font-size-body);
  font-weight: 700;
  text-align: center;
}

body.page-class-schedule .class-schedule-nav-button {
  width: auto;
  min-width: 0;
  padding: 6px 14px;
}

body.page-class-schedule .class-schedule-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

body.page-class-schedule .class-schedule-month-grid {
  grid-template-rows: repeat(auto-fit, minmax(0, 1fr));
}

body.page-class-schedule .class-schedule-day-grid {
  grid-template-columns: minmax(0, 1fr);
}

body.page-class-schedule .class-schedule-day-grid .class-schedule-day {
  min-height: 160px;
}

body.page-class-schedule-display .class-schedule-day-grid .class-schedule-day {
  min-height: 0;
}

body.page-class-schedule .class-schedule-day {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 120px;
  padding: 10px;
  border: var(--border-subtle);
  border-radius: var(--radius-card);
  background: var(--resource-display-card-fill);
}

body.page-class-schedule .class-schedule-day-header {
  margin: 0;
  font-size: var(--font-size-small);
  font-weight: 700;
  line-height: var(--line-height-tight);
}

body.page-class-schedule .class-schedule-day-header.is-today {
  color: var(--color-accent);
}

body.page-class-schedule .class-schedule-day.is-outside-month {
  opacity: 0.55;
}

body.page-class-schedule .class-schedule-day-events {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: stretch;
  align-content: flex-start;
  gap: 8px;
}

body.page-class-schedule-display .class-schedule-day {
  min-height: 0;
}

body.page-class-schedule-display .class-schedule-week-grid--display {
  align-items: start;
}

body.page-class-schedule-display .class-schedule-day-events {
  flex: 0 1 auto;
}

body.page-class-schedule .class-schedule-day-empty {
  margin: 0;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-card);
  background: var(--panel-nested-fill);
  box-sizing: border-box;
  font-size: var(--font-size-small);
  font-weight: 600;
  opacity: 0.9;
  text-align: center;
}

body.page-class-schedule .class-schedule-section-hint {
  margin: 0 0 10px;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: var(--line-height-body);
  opacity: 0.9;
}

body.page-class-schedule .class-schedule-section-hint[hidden] {
  display: none !important;
}

body.page-class-schedule .class-schedule-event-chip {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: max-content;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

body.page-class-schedule .class-schedule-event-main {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
}

body.page-class-schedule .class-schedule-event-open {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 8px;
  border: 2px solid var(--color-accent);
  border-radius: var(--radius-card);
  background: rgb(var(--panel-tint-purple) / var(--panel-op-strong));
  color: inherit;
  text-decoration: none;
  box-sizing: border-box;
}

body.page-class-schedule .class-schedule-event-open:hover {
  background: var(--color-accent);
  border-color: var(--color-accent-hover);
  color: var(--color-text-on-accent);
}

body.page-class-schedule .class-schedule-event-resource-icon {
  width: 1.35rem;
  height: 1.35rem;
  display: block;
  flex-shrink: 0;
}

body.page-class-schedule .class-schedule-event .class-schedule-event-resource-icon,
body.page-class-schedule .class-schedule-display-event .class-schedule-event-resource-icon {
  margin-bottom: 4px;
}

body.page-class-schedule .class-schedule-display-event--link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

body.page-class-schedule .class-schedule-display-event--link:hover {
  background: var(--color-accent);
  border-color: var(--color-accent-hover);
  color: var(--color-text-on-accent);
}

body.page-class-schedule .class-schedule-add-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 4px;
}

body.page-class-schedule .class-schedule-add-choice[hidden] {
  display: none !important;
}

body.page-class-schedule .class-schedule-add-choice-button {
  min-width: 10rem;
}

body.page-class-schedule .class-schedule-resource-pickers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

body.page-class-schedule .class-schedule-resource-pickers[hidden] {
  display: none !important;
}

body.page-class-schedule .class-schedule-link-info {
  margin: 0 0 12px;
  font-size: var(--font-size-small);
  line-height: var(--line-height-tight);
}

body.page-class-schedule .class-schedule-event {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  width: max-content;
  max-width: 100%;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 2px solid var(--color-accent);
  border-radius: var(--radius-card);
  background: rgb(var(--panel-tint-purple) / var(--panel-op-strong));
  color: inherit;
  font-family: inherit;
  font-size: var(--font-size-small);
  font-weight: 700;
  line-height: var(--line-height-tight);
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
}

body.page-class-schedule .class-schedule-event-chip.is-selected .class-schedule-event,
body.page-class-schedule .class-schedule-event.is-selected,
body.page-class-schedule .class-schedule-event:hover {
  background: var(--color-accent);
  border-color: var(--color-accent-hover);
  color: var(--color-text-on-accent);
}

body.page-class-schedule .class-schedule-event-reorder {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}

body.page-class-schedule .class-schedule-event-move {
  flex: 1 1 auto;
  min-width: 1.75rem;
  padding: 2px 6px;
  border: var(--border-subtle);
  border-radius: var(--radius-pill);
  background: rgb(255 255 255 / 18%);
  color: inherit;
  font-family: inherit;
  font-size: var(--font-size-small);
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

body.page-class-schedule .class-schedule-event-move:hover:not(:disabled) {
  background: rgb(255 255 255 / 28%);
}

body.page-class-schedule .class-schedule-event-move:disabled {
  opacity: 0.35;
  cursor: default;
}

body.page-class-schedule .class-schedule-display-event {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: stretch;
  width: max-content;
  max-width: 100%;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 2px solid var(--color-accent);
  border-radius: var(--radius-card);
  background: rgb(var(--panel-tint-purple) / var(--panel-op-strong));
  font-size: var(--font-size-body);
  font-weight: 700;
  line-height: var(--line-height-tight);
  box-sizing: border-box;
}

body.page-class-schedule .class-schedule-panel {
  margin-top: 8px;
  padding: 14px;
  border: none;
  border-radius: var(--radius-card);
  background: var(--panel-nested-fill);
}

body.page-class-schedule .class-schedule-panel h2 {
  margin: 0 0 10px;
  font-size: var(--font-size-resource-section);
  font-weight: 700;
}

body.page-class-schedule .class-schedule-add-event-wrap {
  display: flex;
  align-items: flex-start;
  align-self: center;
  flex: 0 0 auto;
}

body.page-class-schedule .class-schedule-add-event-button {
  width: 2.5rem;
  min-width: 2.5rem;
  height: 2.5rem;
  margin-left: 0;
  border-width: 4px;
  aspect-ratio: 1;
}

body.page-class-schedule .class-schedule-panel[hidden] {
  display: none !important;
}

body.page-class-schedule .class-schedule-form {
  display: grid;
  gap: 10px;
  margin-top: 0;
}

body.page-class-schedule .class-schedule-form[hidden] {
  display: none !important;
}

body.page-class-schedule .class-schedule-primary-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

body.page-class-schedule .class-schedule-primary-fields--add {
  grid-template-columns: minmax(0, 1.4fr) auto minmax(0, 0.9fr) auto;
}

body.page-class-schedule .class-schedule-primary-fields .class-schedule-field > span:first-child {
  display: block;
  min-height: calc(var(--font-size-small) * var(--line-height-tight));
  line-height: var(--line-height-tight);
}

body.page-class-schedule .class-schedule-primary-fields .class-schedule-image-host {
  margin-top: 0;
  min-width: 0;
}

body.page-class-schedule .class-schedule-primary-fields .image-attachment {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(10px + 10px + (var(--font-size-body) * var(--line-height-body)));
  padding: 0;
  gap: 6px;
}

body.page-class-schedule .class-schedule-primary-fields .image-attachment-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

body.page-class-schedule .class-schedule-primary-fields .image-attachment-add,
body.page-class-schedule .class-schedule-primary-fields .image-attachment-remove {
  box-sizing: border-box;
  width: auto;
  min-height: calc(10px + 10px + (var(--font-size-body) * var(--line-height-body)));
  margin: 0;
  padding: 10px 12px;
  white-space: nowrap;
}

body.page-class-schedule .class-schedule-primary-fields .image-attachment-thumb {
  max-height: 48px;
}

body.page-class-schedule .class-schedule-field--repeat {
  justify-items: start;
}

body.page-class-schedule .class-schedule-repeat-control {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(10px + 10px + (var(--font-size-body) * var(--line-height-body)));
  padding: 0 4px;
}

body.page-class-schedule .class-schedule-repeat-control input {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  accent-color: var(--color-accent);
  cursor: pointer;
}

@media (max-width: 900px) {
  body.page-class-schedule .class-schedule-primary-fields,
  body.page-class-schedule .class-schedule-primary-fields--add {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  body.page-class-schedule .class-schedule-primary-fields,
  body.page-class-schedule .class-schedule-primary-fields--add {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

body.page-class-schedule .class-schedule-field {
  display: grid;
  gap: 6px;
  font-size: var(--font-size-small);
  font-weight: 700;
}

body.page-class-schedule .class-schedule-optional {
  font-weight: 600;
  opacity: 0.7;
}

body.page-class-schedule .class-schedule-input {
  width: 100%;
  box-sizing: border-box;
  min-height: calc(10px + 10px + (var(--font-size-body) * var(--line-height-body)));
  padding: 10px 12px;
  border: var(--border-subtle);
  border-radius: var(--radius-card);
  background: rgb(255 255 255 / 18%);
  color: inherit;
  caret-color: var(--caret-color);
  cursor: var(--cursor-text);
  font-family: inherit;
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
}

body.page-class-schedule .class-schedule-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--font-size-small);
  font-weight: 700;
}

body.page-class-schedule .class-schedule-recurrence-block {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: none;
  min-inline-size: 0;
}

body.page-class-schedule .class-schedule-recurrence-block[hidden],
body.page-class-schedule .class-schedule-recurrence-option > .class-schedule-field[hidden],
body.page-class-schedule .class-schedule-recurrence-option > .class-schedule-recurrence-note[hidden] {
  display: none !important;
}

body.page-class-schedule .class-schedule-recurrence-option {
  display: grid;
  gap: 8px;
}

body.page-class-schedule .class-schedule-recurrence-option > .class-schedule-field,
body.page-class-schedule .class-schedule-recurrence-option > .class-schedule-recurrence-note {
  margin-left: 1.75rem;
}

body.page-class-schedule .class-schedule-recurrence-label {
  margin: 0;
  padding: 0;
  font-size: var(--font-size-small);
  font-weight: 700;
}

body.page-class-schedule .class-schedule-recurrence-block .class-schedule-view-toggle {
  margin-bottom: 0;
}

body.page-class-schedule .class-schedule-recurrence-note {
  margin: 0;
  font-size: var(--font-size-caption);
  font-weight: 600;
  opacity: 0.8;
}

body.page-class-schedule-display .class-schedule-display-card {
  text-align: center;
}

body.page-class-schedule-display .class-schedule-week-grid--display .class-schedule-day {
  min-height: 0;
}

@media (max-width: 900px) {
  body.page-class-schedule .class-schedule-week-grid:not(.class-schedule-day-grid) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  body.page-class-schedule .class-schedule-week-nav-buttons {
    grid-template-columns: 1fr;
  }

  body.page-class-schedule .class-schedule-week-grid:not(.class-schedule-day-grid) {
    grid-template-columns: 1fr;
  }
}

/* Resource run/display panels — same Recipe F purple as setup */

.setup-card.resource-fullscreen-target:not(:fullscreen):not(:-webkit-full-screen),
.turn-taking-display.resource-fullscreen-target:not(:fullscreen):not(:-webkit-full-screen) {
  background-color: rgb(var(--panel-tint-purple) / var(--panel-op-outer));
  backdrop-filter: blur(8px);
}

/* Full screen controls — icon toggle, top-right of card toolbar */

.resource-fullscreen-button {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  line-height: 0;
}

.resource-sound-button {
  position: absolute;
  top: 0;
  right: 2.5rem;
  z-index: 2;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  line-height: 0;
}

.resource-sound-button:hover,
.resource-sound-button:focus-visible {
  color: var(--color-accent);
  outline: none;
}

.resource-sound-button .sound-icon {
  display: block;
  width: 100%;
  height: 100%;
}

.resource-sound-button .sound-icon-on,
.resource-sound-button.is-active .sound-icon-muted {
  display: none;
}

.resource-sound-button.is-active .sound-icon-on {
  display: block;
}

.resource-fullscreen-button:hover,
.resource-fullscreen-button:focus-visible {
  color: var(--color-accent);
  outline: none;
}

.resource-fullscreen-button.is-active {
  background: transparent;
  color: inherit;
}

.resource-fullscreen-button.is-active:hover,
.resource-fullscreen-button.is-active:focus-visible {
  color: var(--color-accent);
}

.resource-fullscreen-icon {
  display: block;
  width: 100%;
  height: 100%;
}

.resource-fullscreen-icon--exit {
  display: none;
}

.resource-fullscreen-button.is-active .resource-fullscreen-icon--enter {
  display: none;
}

.resource-fullscreen-button.is-active .resource-fullscreen-icon--exit {
  display: block;
}

.turn-taking-toolbar:has(.resource-fullscreen-button),
.random-order-toolbar:has(.resource-fullscreen-button),
.team-builder-toolbar:has(.resource-fullscreen-button),
.jobs-board-toolbar:has(.resource-fullscreen-button),
.quiet-countdown-toolbar:has(.resource-fullscreen-button),
.quiet-pops-toolbar:has(.resource-fullscreen-button),
.pop-pal-prompts-toolbar:has(.resource-fullscreen-button),
.revision-board-toolbar:has(.resource-fullscreen-button),
.what-if-board-toolbar:has(.resource-fullscreen-button),
.class-schedule-toolbar:has(.resource-fullscreen-button),
.first-next-then-toolbar:has(.resource-fullscreen-button),
.group-checklist-toolbar:has(.resource-fullscreen-button) {
  position: relative;
  /* Keep title centred; reserve space so the icon does not overlap long titles */
  padding-inline: 2.5rem;
}


.resource-display-header {
  position: relative;
  display: flex;
  justify-content: flex-end;
  min-height: 2rem;
  margin-bottom: 12px;
}

/*
  Outlined white text for class-facing display content (always on — not
  fullscreen-only). Improves readability of prompts, names, titles, etc.
*/
.resource-outlined-text {
  color: #fff;
  letter-spacing: 0.02em;
  -webkit-text-stroke: 0.05em var(--color-cauldron-green);
  paint-order: stroke fill;
  text-shadow: var(--shadow-text);
}

/*
  Setup stays flat (shadow only on titles) so teachers don’t read config as
  “celebration / class display” mode. Display stroke lives on the stage below.
*/
.setup-card:not(.resource-fullscreen-target) :is(h1, h2, h3, .subtitle, p, li, label, .resource-page-intro) {
  -webkit-text-stroke: 0;
  paint-order: normal;
}

.resource-fullscreen-stage :where(
  h1,
  h2,
  h3,
  p,
  li,
  .random-order-output-item,
  .pop-pal-prompts-output-title,
  .pop-pal-prompts-output-item,
  .what-if-board-output-title,
  .what-if-board-output-item,
  .what-if-board-output-condition,
  .what-if-board-output-solution,
  .revision-board-output-title,
  .revision-board-output-item,
  .team-builder-output-intro,
  .team-builder-output-pupils .pupil-chip,
  .jobs-board-output-intro,
  .jobs-board-output-pupils .pupil-chip,
  .jobs-board-output-title-text,
  .jobs-board-output-heading,
  .turn-taking-current-name,
  .turn-taking-up-next,
  .turn-taking-countdown-number,
  .turn-taking-done-title,
  .turn-taking-done-list li,
  .quiet-countdown-heading,
  .quiet-countdown-status-line,
  .quiet-countdown-countdown-number,
  .quiet-countdown-noisometer-label,
  .quiet-countdown-noisometer-hint,
  .quiet-pops-status-line,
  .class-schedule-display-intro,
  .class-schedule-week-label,
  .class-schedule-status,
  .first-next-then-square--display .first-next-then-title-text,
  .group-checklist-output-teams-heading
) {
  color: #fff;
  letter-spacing: 0.02em;
  -webkit-text-stroke: 0.05em var(--color-cauldron-green);
  paint-order: stroke fill;
  text-shadow: var(--shadow-text);
}

/* Number badges keep dark-on-accent fill, no green stroke */
.resource-fullscreen-stage :where(
  .random-order-output-item,
  .pop-pal-prompts-output-item,
  .what-if-board-output-item,
  .revision-board-output-item
)::before {
  -webkit-text-stroke: 0;
  text-shadow: none;
  color: var(--color-text-on-accent);
}

/* Coloured group/team pills already use dark text on fill */
.resource-fullscreen-stage :where(
  .team-builder-output-heading,
  .group-header
) {
  -webkit-text-stroke: 0;
  text-shadow: none;
}

/* Quiet Pops award cue: neon green fill, white stroke (opposite of outlined white) */
.resource-fullscreen-stage .quiet-pops-award-cue {
  color: var(--color-cauldron-green);
  -webkit-text-stroke: 0.05em #fff;
  paint-order: stroke fill;
  text-shadow: var(--shadow-text);
}

/*
  Display cards with a stage fill leftover viewport height in the normal
  (non-fullscreen) page layout, so class content grows instead of leaving
  empty space under a short card.
*/
.resource-fullscreen-target:not([hidden]):not(:fullscreen):not(:-webkit-full-screen) {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
  overflow: auto;
}

.resource-fullscreen-target:not([hidden]):not(:fullscreen):not(:-webkit-full-screen)
  > .resource-fullscreen-stage {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: safe center;
  min-width: 0;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
}

.resource-fullscreen-target:not([hidden]):not(:fullscreen):not(:-webkit-full-screen)
  > .resource-panel-actions {
  flex: 0 0 auto;
  width: 100%;
  margin-top: auto;
}

/* body prefix keeps this above page-specific panel backgrounds (e.g. turn-taking). */
body .resource-fullscreen-target:fullscreen,
body .resource-fullscreen-target:-webkit-full-screen,
body .setup-card.resource-fullscreen-target:fullscreen,
body .setup-card.resource-fullscreen-target:-webkit-full-screen {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: none;
  height: 100%;
  overflow: auto;
  padding: clamp(12px, 2vw, 28px);
  border: none;
  border-radius: 0;
  backdrop-filter: none;
  background-color: var(--page-bg-color);
  background-image: var(--page-bg-image);
  background-position: var(--page-bg-position);
  background-repeat: no-repeat;
  background-size: var(--page-bg-size);
  /* Default type scale — any text using these tokens grows in fullscreen. */
  --font-size-title: clamp(1.85rem, 3.4vw, 2.35rem);
  --font-size-subtitle: clamp(1.125rem, 2.4vw, 1.55rem);
  --font-size-label: clamp(1.125rem, 2.4vw, 1.55rem);
  --font-size-body: clamp(1.125rem, 2.4vw, 1.55rem);
  --font-size-input: clamp(1.125rem, 2.4vw, 1.55rem);
  --font-size-button: clamp(1.25rem, 2.6vw, 1.7rem);
  --font-size-button-secondary: clamp(1.125rem, 2.4vw, 1.55rem);
  --font-size-small: clamp(1rem, 2.1vw, 1.3rem);
  --font-size-caption: clamp(0.95rem, 1.9vw, 1.2rem);
  --font-size-resource-page-title: clamp(2.2rem, 5.2vw, 2.85rem);
  --font-size-resource-page-intro: clamp(1.3rem, 2.9vw, 1.55rem);
  --font-size-resource-section: clamp(1.22rem, 2.5vw, 1.42rem);
}

/*
  Class-facing content between toolbar and action buttons.
  Grows to fill leftover viewport height in fullscreen.
*/
.resource-fullscreen-target:fullscreen > .resource-fullscreen-stage,
.resource-fullscreen-target:-webkit-full-screen > .resource-fullscreen-stage {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
}

.resource-fullscreen-target:fullscreen > .resource-panel-actions,
.resource-fullscreen-target:-webkit-full-screen > .resource-panel-actions {
  flex: 0 0 auto;
  width: 100%;
  margin-top: auto;
}

/*
  Auto-hide teacher chrome (toolbar + bottom actions) after idle in fullscreen.
  Toggled by fullscreen.js via .is-fullscreen-chrome-idle.
*/
.resource-fullscreen-target:fullscreen
  > :is([class*="-toolbar"], .resource-panel-actions),
.resource-fullscreen-target:-webkit-full-screen
  > :is([class*="-toolbar"], .resource-panel-actions) {
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.resource-fullscreen-target:fullscreen.is-fullscreen-chrome-idle
  > :is([class*="-toolbar"], .resource-panel-actions),
.resource-fullscreen-target:-webkit-full-screen.is-fullscreen-chrome-idle
  > :is([class*="-toolbar"], .resource-panel-actions) {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/*
  Default fullscreen enlargement for chips, list cards, and common labels.
  Page-specific rules may enlarge hero elements (names, timers) further.
*/
.resource-fullscreen-target:fullscreen .pupil-chip,
.resource-fullscreen-target:-webkit-full-screen .pupil-chip {
  padding: clamp(8px, 1.2vw, 12px) clamp(12px, 1.6vw, 16px);
}

.resource-fullscreen-target:fullscreen :is(
  .random-order-output-intro,
  .team-builder-output-intro,
  .jobs-board-output-intro,
  .class-schedule-display-intro,
  .class-schedule-week-label,
  .quiet-countdown-status-line,
  .quiet-pops-status-line
),
.resource-fullscreen-target:-webkit-full-screen :is(
  .random-order-output-intro,
  .team-builder-output-intro,
  .jobs-board-output-intro,
  .class-schedule-display-intro,
  .class-schedule-week-label,
  .quiet-countdown-status-line,
  .quiet-pops-status-line
) {
  font-size: clamp(1.125rem, 2.4vw, 1.65rem);
}

.resource-fullscreen-target:fullscreen :is(
  .team-builder-output-heading,
  .jobs-board-output-heading,
  .quiet-countdown-heading,
  .class-schedule-day-header
),
.resource-fullscreen-target:-webkit-full-screen :is(
  .team-builder-output-heading,
  .jobs-board-output-heading,
  .quiet-countdown-heading,
  .class-schedule-day-header
) {
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.resource-fullscreen-target:fullscreen :is(
  .team-builder-output-heading,
  .jobs-board-output-heading
),
.resource-fullscreen-target:-webkit-full-screen :is(
  .team-builder-output-heading,
  .jobs-board-output-heading
) {
  padding: clamp(12px, 1.6vw, 18px) 12px;
}

.resource-fullscreen-target:fullscreen :is(
  .pop-pal-prompts-output-title,
  .what-if-board-output-title,
  .revision-board-output-title
),
.resource-fullscreen-target:-webkit-full-screen :is(
  .pop-pal-prompts-output-title,
  .what-if-board-output-title,
  .revision-board-output-title
) {
  font-size: clamp(2rem, 6.5vw, 3.25rem);
}

.resource-fullscreen-target:fullscreen :is(
  .random-order-output-item,
  .pop-pal-prompts-output-item,
  .what-if-board-output-item,
  .revision-board-output-item
),
.resource-fullscreen-target:-webkit-full-screen :is(
  .random-order-output-item,
  .pop-pal-prompts-output-item,
  .what-if-board-output-item,
  .revision-board-output-item
) {
  padding: clamp(14px, 1.8vw, 22px) clamp(14px, 1.8vw, 22px) clamp(14px, 1.8vw, 22px) clamp(52px, 5vw, 64px);
  font-size: clamp(1.25rem, 2.6vw, 2rem);
}

.resource-fullscreen-target:fullscreen :is(
  .random-order-output-item,
  .pop-pal-prompts-output-item,
  .what-if-board-output-item,
  .revision-board-output-item
)::before,
.resource-fullscreen-target:-webkit-full-screen :is(
  .random-order-output-item,
  .pop-pal-prompts-output-item,
  .what-if-board-output-item,
  .revision-board-output-item
)::before {
  left: clamp(14px, 1.6vw, 20px);
  width: clamp(26px, 2.4vw, 34px);
  height: clamp(26px, 2.4vw, 34px);
  font-size: clamp(0.95rem, 1.6vw, 1.25rem);
}

.resource-fullscreen-target:fullscreen .class-schedule-display-event,
.resource-fullscreen-target:-webkit-full-screen .class-schedule-display-event {
  padding: clamp(10px, 1.4vw, 16px) clamp(12px, 1.6vw, 18px);
  font-size: clamp(1.05rem, 2.2vw, 1.45rem);
  gap: clamp(6px, 1vw, 10px);
}

.resource-fullscreen-target:fullscreen .class-schedule-day-empty,
.resource-fullscreen-target:-webkit-full-screen .class-schedule-day-empty {
  font-size: clamp(0.95rem, 2vw, 1.25rem);
}

.resource-fullscreen-target:fullscreen .class-schedule-display-event-image,
.resource-fullscreen-target:-webkit-full-screen .class-schedule-display-event-image {
  max-height: clamp(108px, 18vh, 210px);
}

body.page-turn-taking .turn-taking-display.resource-fullscreen-target:fullscreen,
body.page-turn-taking .turn-taking-display.resource-fullscreen-target:-webkit-full-screen {
  text-align: center;
}

body.page-turn-taking .turn-taking-display:fullscreen .turn-taking-stage,
body.page-turn-taking .turn-taking-display:-webkit-full-screen .turn-taking-stage {
  width: 100%;
  max-width: none;
  gap: clamp(24px, 5vw, 64px);
  margin-bottom: clamp(16px, 3vw, 28px);
}

body.page-turn-taking .turn-taking-display:fullscreen .turn-taking-current-name,
body.page-turn-taking .turn-taking-display:-webkit-full-screen .turn-taking-current-name {
  max-width: min(52vw, 40rem);
  font-size: clamp(2.5rem, 9vw, 6.5rem);
}

body.page-turn-taking .turn-taking-display:fullscreen .turn-taking-countdown-wrap,
body.page-turn-taking .turn-taking-display:-webkit-full-screen .turn-taking-countdown-wrap {
  width: min(38vmin, 440px);
  height: min(38vmin, 440px);
}

body.page-turn-taking .turn-taking-display:fullscreen .turn-taking-countdown-number,
body.page-turn-taking .turn-taking-display:-webkit-full-screen .turn-taking-countdown-number {
  font-size: clamp(2.5rem, 10vmin, 5rem);
}

body.page-turn-taking .turn-taking-display:fullscreen .turn-taking-up-next,
body.page-turn-taking .turn-taking-display:-webkit-full-screen .turn-taking-up-next {
  font-size: clamp(1.25rem, 3.5vw, 2rem);
  margin-bottom: 0;
}

body.page-turn-taking .turn-taking-display:fullscreen .turn-taking-done-title,
body.page-turn-taking .turn-taking-display:-webkit-full-screen .turn-taking-done-title {
  font-size: clamp(2rem, 6vw, 3.5rem);
}

body.page-turn-taking .turn-taking-display:fullscreen .turn-taking-done-list,
body.page-turn-taking .turn-taking-display:-webkit-full-screen .turn-taking-done-list {
  justify-content: center;
  gap: 12px;
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
}

body.page-random-order .random-order-output:not([hidden]) .random-order-output-list {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  align-content: safe center;
}

body.page-random-order .random-order-output:fullscreen .random-order-output-intro,
body.page-random-order .random-order-output:-webkit-full-screen .random-order-output-intro {
  margin-bottom: clamp(12px, 2vw, 20px);
}

body.page-random-order .random-order-output:fullscreen .random-order-output-list,
body.page-random-order .random-order-output:-webkit-full-screen .random-order-output-list {
  margin-bottom: 0;
  gap: clamp(12px, 1.6vw, 22px);
}

body.page-team-builder .team-builder-output-card:not([hidden]) .team-builder-output-row {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  align-items: stretch;
  justify-content: stretch;
}

body.page-team-builder .team-builder-output-card:not([hidden]) .team-builder-output-column {
  display: flex;
  flex-direction: column;
  flex: 1 1 200px;
  min-width: min(200px, 100%);
  max-width: none;
}

@media (max-width: 700px) {
  body.page-team-builder .team-builder-output-card:not([hidden]) .team-builder-output-column {
    flex: 1 1 100%;
    min-width: 100%;
    max-width: 100%;
  }

  body.page-jobs-board .jobs-board-output-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

body.page-team-builder .team-builder-output-card:not([hidden]) .team-builder-output-pupils {
  flex: 1 1 auto;
}

body.page-team-builder .team-builder-output-card:fullscreen .team-builder-output-pupils,
body.page-team-builder .team-builder-output-card:-webkit-full-screen .team-builder-output-pupils {
  gap: clamp(8px, 1.2vw, 14px);
  padding: clamp(12px, 1.6vw, 20px);
}

body.page-jobs-board .jobs-board-output-card:not([hidden]) .jobs-board-output-row {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  align-content: stretch;
}

body.page-quiet-countdown .quiet-countdown-display:fullscreen .quiet-countdown-countdown-wrap,
body.page-quiet-countdown .quiet-countdown-display:-webkit-full-screen .quiet-countdown-countdown-wrap {
  width: min(42vmin, 440px);
  height: min(42vmin, 440px);
  margin-inline: auto;
}

body.page-quiet-countdown .quiet-countdown-display:fullscreen .quiet-countdown-countdown-number,
body.page-quiet-countdown .quiet-countdown-display:-webkit-full-screen .quiet-countdown-countdown-number {
  font-size: clamp(2.5rem, 10vmin, 5rem);
}

body.page-quiet-countdown .quiet-countdown-display:fullscreen .quiet-countdown-heading,
body.page-quiet-countdown .quiet-countdown-display:-webkit-full-screen .quiet-countdown-heading {
  font-size: clamp(1.75rem, 5vw, 3rem);
}

body.page-quiet-pops .quiet-pops-display:fullscreen .resource-fullscreen-stage,
body.page-quiet-pops .quiet-pops-display:-webkit-full-screen .resource-fullscreen-stage {
  justify-content: center;
  align-items: center;
  gap: clamp(8px, 1.5vh, 20px);
  min-height: 0;
  overflow: hidden;
}

body.page-quiet-pops .quiet-pops-display:fullscreen .quiet-pops-status-line,
body.page-quiet-pops .quiet-pops-display:-webkit-full-screen .quiet-pops-status-line {
  flex: 0 0 auto;
  max-width: min(44rem, 92vw);
  margin: 0;
  font-size: clamp(1.05rem, 2.2vw, 1.65rem);
  line-height: 1.3;
}

body.page-quiet-pops .quiet-pops-display:fullscreen .quiet-countdown-noisometer,
body.page-quiet-pops .quiet-pops-display:-webkit-full-screen .quiet-countdown-noisometer {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(22vmin, 180px);
  max-width: none;
  max-height: 100%;
  min-height: 0;
  margin: 0;
}

body.page-quiet-pops .quiet-pops-display:fullscreen .quiet-countdown-noisometer-label,
body.page-quiet-pops .quiet-pops-display:-webkit-full-screen .quiet-countdown-noisometer-label {
  flex: 0 0 auto;
  margin-bottom: clamp(8px, 1.2vh, 14px);
  font-size: clamp(0.85rem, 1.8vw, 1.2rem);
}

body.page-quiet-pops .quiet-pops-display:fullscreen .quiet-countdown-traffic-lights,
body.page-quiet-pops .quiet-pops-display:-webkit-full-screen .quiet-countdown-traffic-lights {
  flex: 0 1 auto;
  width: 100%;
  box-sizing: border-box;
  gap: clamp(8px, 1.4vh, 16px);
  padding: clamp(12px, 1.8vh, 22px) clamp(14px, 2.2vw, 28px);
  border-width: 3px;
  border-radius: clamp(16px, 2vmin, 28px);
}

body.page-quiet-pops .quiet-pops-display:fullscreen .quiet-countdown-light,
body.page-quiet-pops .quiet-pops-display:-webkit-full-screen .quiet-countdown-light {
  width: clamp(48px, 9.5vmin, 100px);
  height: clamp(48px, 9.5vmin, 100px);
  border-width: 2px;
}

body.page-quiet-pops .quiet-pops-display:fullscreen .quiet-countdown-light--red.is-active,
body.page-quiet-pops .quiet-pops-display:-webkit-full-screen .quiet-countdown-light--red.is-active {
  box-shadow:
    inset 0 2px 8px rgb(0 0 0 / 25%),
    0 0 clamp(12px, 2vmin, 24px) rgb(224 90 90 / 75%);
}

body.page-quiet-pops .quiet-pops-display:fullscreen .quiet-countdown-light--amber.is-active,
body.page-quiet-pops .quiet-pops-display:-webkit-full-screen .quiet-countdown-light--amber.is-active {
  box-shadow:
    inset 0 2px 8px rgb(0 0 0 / 25%),
    0 0 clamp(12px, 2vmin, 24px) rgb(232 184 109 / 75%);
}

body.page-quiet-pops .quiet-pops-display:fullscreen .quiet-countdown-light--green.is-active,
body.page-quiet-pops .quiet-pops-display:-webkit-full-screen .quiet-countdown-light--green.is-active {
  box-shadow:
    inset 0 2px 8px rgb(0 0 0 / 25%),
    0 0 clamp(12px, 2vmin, 24px) rgb(168 212 138 / 75%);
}

body.page-quiet-pops .quiet-pops-display:fullscreen .quiet-countdown-noisometer-hint,
body.page-quiet-pops .quiet-pops-display:-webkit-full-screen .quiet-countdown-noisometer-hint {
  flex: 0 0 auto;
  margin-top: clamp(8px, 1.2vh, 16px);
  min-height: 1.25em;
  font-size: clamp(1rem, 2.2vw, 1.5rem);
}

body.page-quiet-pops .quiet-pops-display:fullscreen .quiet-pops-award-cue,
body.page-quiet-pops .quiet-pops-display:-webkit-full-screen .quiet-pops-award-cue {
  flex: 0 0 auto;
  margin-top: clamp(8px, 1.4vh, 18px);
  font-size: clamp(2.25rem, 7vmin, 4.5rem);
}

body.page-class-schedule-display .class-schedule-display-card:fullscreen .class-schedule-week-grid--display,
body.page-class-schedule-display .class-schedule-display-card:-webkit-full-screen .class-schedule-week-grid--display {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  gap: clamp(10px, 1.5vw, 18px);
}

body.page-class-schedule-display .class-schedule-display-card:fullscreen .class-schedule-display-intro,
body.page-class-schedule-display .class-schedule-display-card:-webkit-full-screen .class-schedule-display-intro {
  margin-bottom: clamp(16px, 2.2vw, 28px);
}

body.page-class-schedule-display .class-schedule-display-card:fullscreen .class-schedule-day,
body.page-class-schedule-display .class-schedule-display-card:-webkit-full-screen .class-schedule-day {
  gap: clamp(10px, 1.4vw, 16px);
  padding: clamp(12px, 1.8vw, 22px);
}

body.page-class-schedule-display .class-schedule-display-card:fullscreen .class-schedule-day-grid .class-schedule-day,
body.page-class-schedule-display .class-schedule-display-card:-webkit-full-screen .class-schedule-day-grid .class-schedule-day {
  min-height: 0;
}

body.page-class-schedule-display .class-schedule-display-card:fullscreen .class-schedule-week-grid--display:not(.class-schedule-day-grid) .class-schedule-day,
body.page-class-schedule-display .class-schedule-display-card:-webkit-full-screen .class-schedule-week-grid--display:not(.class-schedule-day-grid) .class-schedule-day {
  min-height: 0;
}

body.page-class-schedule-display .class-schedule-display-card:fullscreen .class-schedule-day-events,
body.page-class-schedule-display .class-schedule-display-card:-webkit-full-screen .class-schedule-day-events {
  gap: clamp(8px, 1.2vw, 14px);
}

/* Pupil login page */

body.page-pupil-login {
  align-items: center;
  justify-content: center;
  padding: var(--page-panel-gap);
  overflow-x: hidden;
}

body.page-pupil-login .pupil-login-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, var(--panel-max-narrow));
  /* Nudge the stack slightly below dead center for the sitting avatar. */
  margin-top: 16px;
  /* Keep the old compact-avatar footprint so the panel stays vertically put. */
  --pupil-login-layout-avatar-width: min(36vw, 140px);
  padding-top: calc(
    var(--pupil-login-layout-avatar-width) * 536 / 400
    - var(--pupil-login-layout-avatar-width) * 0.2
  );
}

body.page-pupil-login .pupil-login-avatar {
  --pupil-login-avatar-width: min(72vw, 280px);
  /* Pull just enough that the sitting bum rests on the panel top. */
  --pupil-login-avatar-overlap: 0.25;
  position: absolute;
  left: 50%;
  bottom: 100%;
  z-index: 1;
  display: block;
  width: var(--pupil-login-avatar-width);
  height: auto;
  margin: 0;
  transform: translateX(-50%)
    translateY(calc(var(--pupil-login-avatar-width) * var(--pupil-login-avatar-overlap)));
  pointer-events: none;
  user-select: none;
}

body.page-pupil-login .pupil-login-avatar.is-standing {
  /* Keep the previous standing seat on the panel (scaled with the larger size). */
  --pupil-login-avatar-overlap: 0.24;
}

body.page-pupil-login .pupil-login-card {
  width: 100%;
  box-sizing: border-box;
  padding: 32px 24px 36px;
  text-align: center;
  position: relative;
  z-index: 0;
}

body.page-pupil-login .pupil-login-heading {
  margin: 0 0 28px;
  font-size: clamp(2rem, 8vw, 2.5rem);
  line-height: 1.1;
}

body.page-pupil-login .pin-dots {
  display: flex;
  justify-content: center;
  gap: clamp(5px, 1.8vw, 8px);
  margin-bottom: 24px;
}

body.page-pupil-login .pin-dot-input {
  box-sizing: border-box;
  width: clamp(1.45rem, 6.5vw, 1.85rem);
  height: clamp(1.65rem, 7.5vw, 2.1rem);
  flex: 0 0 auto;
  padding: 0;
  border: 1.5px solid rgb(255 255 255 / 55%);
  border-radius: 8px;
  background: rgb(255 255 255 / 16%);
  color: var(--color-text);
  font-family: inherit;
  font-size: clamp(0.8rem, 3.2vw, 1rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  text-align: center;
  text-transform: uppercase;
  caret-color: var(--caret-color);
  cursor: var(--cursor-text);
}

body.page-pupil-login .pin-dot-input:focus {
  border-color: var(--color-accent);
  outline: none;
  background: rgb(255 255 255 / 24%);
}

body.page-pupil-login .pin-dot-input.is-filled {
  background: rgb(255 255 255 / 28%);
  border-color: var(--group-color-4);
}

body.page-pupil-login .pupil-login-go {
  width: min(100%, 12rem);
  margin: 0 auto;
}

/* Info pages (about, help, community, etc.) */

body.page-info {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  box-sizing: border-box;
}

body.page-info > .site-footer {
  margin-top: auto;
}

body.page-info .info-page-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-height: 0;
  box-sizing: border-box;
}

body.page-info .info-page-card {
  width: min(100%, var(--panel-max-wide));
  max-height: none;
  align-self: center;
}

body.page-change-password .info-page-body,
body.page-menu-lock .info-page-body,
body.page-account .info-page-body {
  justify-content: center;
  padding: var(--page-panel-gap);
}

body.page-change-password .register-card > h1,
body.page-menu-lock .register-card > h1,
body.page-account .register-card > h1 {
  margin: 0 0 20px;
}

body.page-menu-lock .menu-lock-field-label {
  margin: 0 0 10px;
  text-align: center;
}

body.page-menu-lock .menu-lock-pin-field {
  margin-bottom: 18px;
}

body.page-menu-lock .pin-dots {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 0;
}

body.page-menu-lock .pin-dot-input {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 2px solid rgb(26 46 26 / 35%);
  border-radius: 50%;
  background: transparent;
  color: transparent;
  font-size: 0;
  text-align: center;
  caret-color: transparent;
}

body.page-menu-lock .pin-dot-input:focus {
  border-color: var(--color-accent);
  outline: none;
}

body.page-menu-lock .pin-dot-input.is-filled {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

body.page-menu-lock .menu-lock-remove {
  width: 100%;
  margin-top: 4px;
  margin-bottom: 8px;
}

body.page-info .info-page-toolbar {
  margin-bottom: 20px;
}

body.page-info .info-page-toolbar h1,
body.page-info .info-page-card > h1 {
  margin: 0 0 20px;
}

body.page-info .info-page-placeholder {
  padding: 32px 24px;
  border: 2px dashed rgb(255 255 255 / 28%);
  border-radius: var(--radius-card);
  background: var(--panel-nested-fill);
  text-align: center;
}

body.page-info .info-page-placeholder p {
  margin: 0;
  font-size: var(--font-size-body);
  font-weight: 600;
  opacity: 0.85;
}

body.page-help .help-page-card {
  /* Match welcome container room so FAQ capsule pairs can use full 21:17 size */
  width: min(100%, 76rem);
}

body.page-help .help-section {
  margin: 0 0 24px;
  padding: 20px;
  border: none;
  border-radius: var(--radius-card);
  background: var(--panel-nested-fill);
}

body.page-help .help-section:last-child {
  margin-bottom: 0;
}

body.page-help .help-section .info-page-placeholder {
  background: rgb(255 255 255 / 8%);
}

body.page-help .help-hints-intro {
  margin: 0 0 24px;
  font-size: var(--font-size-body);
  font-weight: 600;
  line-height: var(--line-height-body);
  text-align: left;
  opacity: 0.92;
}

body.page-help .help-classroom-intro-actions {
  display: flex;
  justify-content: flex-start;
}

body.page-help .help-classroom-intro-replay {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 12rem;
  text-decoration: none;
}

body.page-resource-stats .resource-stats-days-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 20px;
  font-size: var(--font-size-body);
  font-weight: 700;
}

body.page-resource-stats .resource-stats-days-label select {
  width: auto;
  min-width: 12rem;
}

body.page-resource-stats .resource-stats-orphan-section {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgb(255 255 255 / 18%);
}

body.page-resource-stats .resource-stats-orphan-section h2 {
  margin: 0 0 8px;
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
}

body.page-resource-stats .resource-stats-orphan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 14px;
}

body.page-resource-stats .resource-stats-orphan-actions .continue-button,
body.page-resource-stats .resource-stats-orphan-actions .submit-button {
  width: auto;
  min-width: 10rem;
}

body.page-resource-stats .resource-stats-orphan-report {
  margin: 0;
  padding: 12px 14px;
  overflow: auto;
  max-height: 22rem;
  border-radius: var(--radius-card);
  background: rgb(0 0 0 / 22%);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

body.page-resource-stats .resource-stats-days-label input[type="email"] {
  width: min(100%, 22rem);
  margin-top: 6px;
}

body.page-help .help-hints-toggle-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 72px;
  padding: 12px 8px 8px;
}

body.page-help .help-hints-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 8px 14px 8px 8px;
  border: var(--border-button);
  border-radius: var(--radius-pill);
  background: rgb(255 255 255 / 18%);
  color: var(--color-text);
  font-family: inherit;
  font-size: var(--font-size-button-secondary);
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

body.page-help .help-hints-toggle:hover,
body.page-help .help-hints-toggle:focus-visible {
  background: rgb(255 255 255 / 28%);
  outline: none;
}

body.page-help .help-hints-toggle-track {
  position: relative;
  display: block;
  width: 52px;
  height: 30px;
  border-radius: 999px;
  background: rgb(0 0 0 / 28%);
  border: 2px solid rgb(255 255 255 / 45%);
  box-sizing: border-box;
  transition: background 160ms ease, border-color 160ms ease;
}

body.page-help .help-hints-toggle.is-on .help-hints-toggle-track {
  background: var(--color-accent);
  border-color: rgb(255 255 255 / 70%);
}

body.page-help .help-hints-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgb(0 0 0 / 25%);
  transition: transform 160ms ease;
}

body.page-help .help-hints-toggle.is-on .help-hints-toggle-thumb {
  transform: translateX(22px);
}

body.page-help .help-hints-toggle-label {
  min-width: 2.25rem;
  text-align: left;
}

body.page-help .help-hints-demo-hint {
  position: absolute;
  top: 0;
  left: calc(50% + 36px);
  z-index: 1;
  margin: 0;
  padding: 6px 10px;
  border: 2px solid rgb(255 255 255 / 70%);
  border-radius: 999px;
  background: var(--group-color-4);
  color: var(--color-text);
  font-size: 0.8125rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  text-shadow: none;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 4px 10px rgb(0 0 0 / 18%);
  animation: help-hints-demo-bounce 1.4s ease-in-out infinite;
  transition: opacity 220ms ease, transform 220ms ease;
}

body.page-help .help-hints-demo-hint[hidden],
body.page-help .help-hints-demo-hint.is-dismissed {
  display: none;
}

@keyframes help-hints-demo-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

body.page-help .help-faq {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body.page-help .help-faq-item {
  margin: 0;
  padding: 0;
  border: none;
  border-radius: var(--radius-card);
  /* Lift above Nested D section fill so accordion tiles stay visible */
  background: rgb(255 255 255 / 10%);
  overflow: hidden;
}

body.page-help .help-faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  font-weight: 700;
  font-size: var(--font-size-resource-section);
  line-height: var(--line-height-body);
}

body.page-help .help-faq-item summary::-webkit-details-marker {
  display: none;
}

body.page-help .help-faq-item summary::after {
  content: "+";
  float: none;
  flex: 0 0 auto;
  font-weight: 700;
  opacity: 0.8;
}

body.page-help .help-faq-item[open] summary::after {
  content: "−";
}

body.page-help .help-faq-item p {
  margin: 0;
  padding: 0 16px 14px;
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  opacity: 0.92;
}

body.page-help .help-faq-item p + p {
  padding-top: 0;
}


/* Help FAQ rewards carousel — standalone layout (not shared with welcome) */
body.page-help .help-faq-item:has(.help-faq-carousel) {
  overflow: visible;
}

body.page-help .help-faq-item-body {
  padding: 0 16px 16px;
  box-sizing: border-box;
}

body.page-help .help-faq-item-body > p {
  padding-left: 0;
  padding-right: 0;
}

body.page-help .help-faq-carousel {
  width: 100%;
  margin: 0;
  box-sizing: border-box;
}

body.page-help .help-faq-carousel .help-rewards-demo-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.85rem;
  justify-content: center;
  align-items: stretch;
  width: 100%;
  max-width: none;
  margin: 0;
  min-height: 0;
}

body.page-help .help-faq-carousel.help-faq-carousel--showing-pairs .help-rewards-demo-stage {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.page-help .help-faq-carousel .help-rewards-demo-slide.is-active {
  display: block;
  width: 100%;
  min-width: 0;
  height: auto;
}

body.page-help .help-faq-carousel .welcome-capsule {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  overflow: hidden;
  border-radius: 1.15rem;
  background: rgb(248 245 252);
  box-shadow: 0 8px 22px rgb(0 0 0 / 20%);
  color: #1c1528;
  container-type: inline-size;
  container-name: help-faq-capsule;
}

body.page-help .help-faq-carousel .welcome-capsule-media {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 21 / 10;
  overflow: hidden;
  background: #d9d0e8;
}

body.page-help .help-faq-carousel .welcome-capsule-media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

body.page-help .help-faq-carousel .welcome-capsule-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 0;
  padding: 0.9rem 1rem 1rem;
  box-sizing: border-box;
}

body.page-help .help-faq-carousel .welcome-capsule-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #17111f;
}

body.page-help .help-faq-carousel .welcome-capsule-caption {
  margin: 0;
  padding: 0;
  opacity: 1;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.45;
  color: #5c5468;
  text-wrap: pretty;
}

body.page-help .help-faq-carousel .help-rewards-demo-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 14px;
}

body.page-help .help-faq-carousel .help-rewards-demo-nav {
  min-width: 2.6rem;
  padding: 8px 12px;
  font-size: 1.15em;
  line-height: 1;
}

body.page-help .help-faq-carousel .help-rewards-demo-dots {
  gap: 10px;
}

body.page-help .help-faq-carousel .help-rewards-demo-dot {
  width: 11px;
  height: 11px;
}

@media (min-width: 701px) {
  body.page-help .help-faq-carousel .welcome-capsule-title {
    font-size: clamp(1.05rem, 4.2cqw, 1.45rem);
  }

  body.page-help .help-faq-carousel .welcome-capsule-caption {
    font-size: clamp(0.88rem, 3.2cqw, 1.1rem);
  }

  body.page-help .help-faq-carousel .welcome-capsule-body {
    gap: 10px;
    padding: 1rem 1.15rem 1.1rem;
  }
}

/* Rewards system demo carousel */

body.page-help .help-rewards-demo,
body.page-welcome .help-rewards-demo {
  margin: 0 12px 16px;
  padding: 4px 0 0;
}

body.page-help .help-rewards-demo-stage,
body.page-welcome .help-rewards-demo-stage {
  position: relative;
  width: min(100%, 560px);
  margin: 0 auto;
}

body.page-help .help-rewards-demo-slide,
body.page-welcome .help-rewards-demo-slide {
  display: none;
}

body.page-help .help-rewards-demo-slide.is-active,
body.page-welcome .help-rewards-demo-slide.is-active {
  display: block;
}

body.page-help .help-rewards-demo-slide[hidden],
body.page-welcome .help-rewards-demo-slide[hidden] {
  display: none !important;
}

body.page-help .help-rewards-demo-frame,
body.page-welcome .help-rewards-demo-frame {
  --grupop-frame-basis: 100%;
  container-type: inline-size;
  container-name: help-rewards-frame;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin: 0;
  overflow: hidden;
  background: rgb(var(--panel-tint-purple) / 88%);
}

body.page-help .help-rewards-demo-panels,
body.page-welcome .help-rewards-demo-panels {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  align-items: stretch;
  width: 100%;
  height: 100%;
  min-height: 0;
}

body.page-help .help-rewards-demo-panels--text-only,
body.page-welcome .help-rewards-demo-panels--text-only {
  grid-template-columns: 1fr;
}

body.page-help .help-rewards-demo-panels--text-only .help-rewards-demo-copy,
body.page-welcome .help-rewards-demo-panels--text-only .help-rewards-demo-copy {
  text-align: center;
  min-height: 0;
}

body.page-help .help-rewards-demo-panels--text-only .help-rewards-demo-copy::after,
body.page-welcome .help-rewards-demo-panels--text-only .help-rewards-demo-copy::after {
  display: none;
}

body.page-help .help-rewards-demo-copy,
body.page-welcome .help-rewards-demo-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(6px, 2.2cqw, 12px);
  box-sizing: border-box;
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: clamp(10px, 4.2cqw, 28px);
  background: color-mix(in srgb, rgb(var(--panel-tint-purple)) 58%, #1a1438 42%);
  color: #fff;
}

body.page-help .help-rewards-demo-copy::after,
body.page-welcome .help-rewards-demo-copy::after {
  content: "";
  position: absolute;
  top: 0;
  right: -36px;
  width: 72px;
  height: 100%;
  background: linear-gradient(
    to right,
    color-mix(in srgb, rgb(var(--panel-tint-purple)) 58%, #1a1438 42%) 0%,
    transparent 100%
  );
  pointer-events: none;
}

body.page-help .help-rewards-demo-copy p,
body.page-welcome .help-rewards-demo-copy p {
  margin: 0;
  font-size: clamp(0.82rem, 4.6cqw, 1.35rem);
  font-weight: 700;
  line-height: 1.35;
  text-wrap: balance;
}

body.page-help .help-rewards-demo-copy--prose p,
body.page-welcome .help-rewards-demo-copy--prose p {
  font-size: clamp(0.78rem, 4cqw, 1.2rem);
  font-weight: 600;
  line-height: 1.5;
  text-wrap: pretty;
}

body.page-help .help-rewards-demo-media,
body.page-welcome .help-rewards-demo-media {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  height: 100%;
  background: #1a1438;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 14%);
  mask-image: linear-gradient(to right, transparent 0%, #000 14%);
}

body.page-help .help-rewards-demo-media img,
body.page-welcome .help-rewards-demo-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
}

body.page-help .help-rewards-demo-controls,
body.page-welcome .help-rewards-demo-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}

body.page-help .help-rewards-demo-nav,
body.page-welcome .help-rewards-demo-nav {
  flex: 0 0 auto;
  min-width: 2.5rem;
  padding: 8px 12px;
  border: var(--border-button);
  border-radius: var(--radius-pill);
  background: var(--panel-nested-fill);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

body.page-help .help-rewards-demo-nav:hover,
body.page-welcome .help-rewards-demo-nav:hover,
body.page-help .help-rewards-demo-nav:focus-visible,
body.page-welcome .help-rewards-demo-nav:focus-visible {
  background: rgb(255 255 255 / 16%);
}

body.page-help .help-rewards-demo-dots,
body.page-welcome .help-rewards-demo-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

body.page-help .help-rewards-demo-dot,
body.page-welcome .help-rewards-demo-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 2px solid rgb(255 255 255 / 55%);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

body.page-help .help-rewards-demo-dot.is-active,
body.page-welcome .help-rewards-demo-dot.is-active {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

body.page-welcome .welcome-feature-carousel{
  width: min(100%, 48rem);
  margin-inline: auto;
}

body.page-welcome .welcome-feature-carousel .welcome-feature-carousel-stage{
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  margin: 0;
}

body.page-welcome .welcome-feature-carousel .welcome-feature-carousel-stage .help-rewards-demo-slide.is-active{
  width: 100%;
}

body.page-welcome .welcome-feature-carousel .help-rewards-demo-controls{
  margin-top: 10px;
}

body.page-welcome .welcome-feature-carousel .help-rewards-demo-controls{
  gap: 22px;
  margin-top: 16px;
}

body.page-welcome .welcome-feature-carousel .help-rewards-demo-nav{
  min-width: 2.85rem;
  padding: 10px 14px;
  font-size: 1.2em;
  line-height: 1;
}

body.page-welcome .welcome-feature-carousel .help-rewards-demo-dots{
  gap: 12px;
}

body.page-welcome .welcome-feature-carousel .help-rewards-demo-dot{
  width: 12px;
  height: 12px;
}

body.page-welcome .welcome-feature-slide{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  width: 100%;
  margin-inline: auto;
}

body.page-welcome .welcome-feature-slide-text{
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
}

body.page-welcome .welcome-feature-slide-text p{
  margin: 0;
  max-width: 40rem;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: 700;
  line-height: 1.45;
  text-wrap: pretty;
  opacity: 1;
  color: rgb(var(--panel-tint-purple));
}

body.page-welcome .welcome-band--dark .welcome-feature-slide-text p{
  color: #c9a0ff;
}

body.page-welcome .welcome-feature-slide-media{
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 100%;
}

body.page-welcome .welcome-feature-slide-media img{
  display: block;
  width: 60%;
  max-width: 60%;
  height: auto;
  max-height: min(52vh, 28rem);
  object-fit: contain;
  border-radius: calc(var(--radius-card) * 0.9);
}

body.page-welcome .welcome-feature-slide-media img.welcome-feature-slide-zoomable{
  cursor: zoom-in;
}

body.page-welcome .welcome-feature-slide-media img.welcome-feature-slide-zoomable:focus-visible{
  outline: 3px solid var(--color-accent);
  outline-offset: 4px;
}

body.page-welcome .welcome-feature-slide-media img.welcome-feature-slide-zoomable:fullscreen,
body.page-welcome .welcome-feature-slide-media img.welcome-feature-slide-zoomable:-webkit-full-screen{
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 0;
  background: #0b1220;
  cursor: zoom-out;
}

@media (max-width: 700px) {
  body.page-welcome .welcome-feature-slide-media img{
    width: 100%;
    max-width: 100%;
    max-height: none;
  }
}

/* Capsule pairs (Airtable-style; 21:10 image, 7 text → card 21:17).
   Pair vs single layout is toggled by JS class (min-width: 701px). */
body.page-welcome .welcome-feature-carousel--pairs{
  --welcome-capsule-width: 34rem;
  --welcome-capsule-gap: 1.1rem;
  width: min(100%, var(--welcome-capsule-width));
  margin-inline: auto;
}

body.page-welcome .welcome-feature-carousel--pairs.welcome-feature-carousel--showing-pairs{
  width: min(100%, calc(var(--welcome-capsule-width) * 2 + var(--welcome-capsule-gap)));
}

body.page-welcome .welcome-feature-carousel--pairs .welcome-feature-carousel-stage{
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--welcome-capsule-gap);
  justify-content: center;
  align-items: stretch;
  width: 100%;
  max-width: none;
  min-height: 0;
}

body.page-welcome
  .welcome-feature-carousel--pairs.welcome-feature-carousel--showing-pairs
  .welcome-feature-carousel-stage {
  grid-template-columns: repeat(2, minmax(0, var(--welcome-capsule-width)));
}

body.page-welcome .welcome-feature-carousel--pairs .help-rewards-demo-slide.is-active{
  display: block;
  width: 100%;
  min-width: 0;
  height: auto;
}

body.page-welcome .welcome-feature-carousel--pairs .welcome-capsule{
  display: flex;
  flex-direction: column;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  overflow: hidden;
  border-radius: 1.35rem;
  background: rgb(248 245 252);
  box-shadow: 0 10px 28px rgb(0 0 0 / 22%);
  color: #1c1528;
  container-type: inline-size;
  container-name: welcome-capsule;
}

body.page-welcome .welcome-feature-carousel--pairs .welcome-capsule-media{
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 21 / 10;
  min-height: 0;
  overflow: hidden;
  background: #d9d0e8;
}

body.page-welcome .welcome-feature-carousel--pairs .welcome-capsule-media img{
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

body.page-welcome .welcome-feature-carousel--pairs .welcome-capsule-body{
  flex: 0 0 auto;
}

body.page-welcome .welcome-capsule-body{
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  padding: 1rem 1.2rem 1.15rem;
  box-sizing: border-box;
}

body.page-welcome .welcome-capsule-title{
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #17111f;
}

body.page-welcome .welcome-capsule-caption{
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.45;
  color: #5c5468;
  text-wrap: pretty;
}

@media (min-width: 701px) {
  /* Scale with capsule width (not viewport) so Help FAQ matches Welcome when cards are narrower */
  body.page-welcome .welcome-capsule-title{
    font-size: clamp(1.25rem, 5cqw, 1.7rem);
  }

  body.page-welcome .welcome-capsule-caption{
    font-size: clamp(1rem, 3.6cqw, 1.22rem);
  }

  body.page-welcome .welcome-capsule-body{
    gap: 12px;
    padding: 1.15rem 1.35rem 1.25rem;
  }
}

body.page-welcome .welcome-capsule-media img.welcome-feature-slide-zoomable{
  cursor: zoom-in;
}

body.page-welcome .welcome-capsule-media img.welcome-feature-slide-zoomable:focus-visible{
  outline: 3px solid var(--color-accent);
  outline-offset: 4px;
}

body.page-welcome .welcome-capsule-media img.welcome-feature-slide-zoomable:fullscreen,
body.page-welcome .welcome-capsule-media img.welcome-feature-slide-zoomable:-webkit-full-screen{
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 0;
  background: #0b1220;
  cursor: zoom-out;
}

body.page-welcome .welcome-band--light .help-rewards-demo-nav {
  background: rgb(26 46 26 / 12%);
  color: var(--welcome-text-dark);
}

body.page-welcome .welcome-band--light .help-rewards-demo-nav:hover,
body.page-welcome .welcome-band--light .help-rewards-demo-nav:focus-visible {
  background: rgb(26 46 26 / 20%);
}

body.page-welcome .welcome-band--light .help-rewards-demo-dot {
  border-color: rgb(26 46 26 / 35%);
}

body.page-welcome .welcome-band--dark .welcome-pricing-alt {
  color: rgb(255 255 255 / 82%);
}

body.page-welcome .welcome-band--dark .welcome-pricing-monthly {
  color: rgb(255 255 255 / 96%);
  font-weight: 700;
}

body.page-welcome .welcome-band--dark .welcome-pricing-monthly strong {
  font-weight: 800;
  color: #fff;
}

body.page-info .resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

body.page-pop-stats {
  --pop-progress-size-card-title: 1.375rem;
  --pop-progress-size-section: 1.125rem;
  --pop-progress-size-body: 1rem;
  --pop-progress-size-meta: 0.875rem;
}

body.page-pop-stats .pop-progress-page-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 24px;
  width: 100%;
}

body.page-edit-class-hub.page-edit-class {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  /* Keep site-chrome header offset — do not zero padding-top. */
  padding-inline: 0;
  padding-bottom: 0;
}

body.page-edit-class-hub .edit-class-page-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  align-items: stretch;
}

body.page-edit-class-hub .edit-class-page-stack > .setup-card {
  width: 100%;
  max-width: none;
  align-self: stretch;
}

body.page-edit-class-hub .edit-class-page-stack > .setup-card > h1,
body.page-edit-class-hub .edit-class-page-stack > .setup-card > h2 {
  text-align: center;
}

body.page-edit-class-hub .edit-class-page-intro {
  text-align: left;
}

body.page-edit-class-hub .edit-class-page-intro-text {
  margin: 0 0 12px;
  font-size: var(--font-size-resource-page-intro);
  font-weight: 600;
  line-height: var(--line-height-body);
  opacity: 0.92;
}

body.page-edit-class-hub .edit-class-page-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

body.page-edit-class-hub .edit-class-page-links a {
  color: var(--color-link);
  font-size: var(--font-size-body);
  font-weight: 700;
  text-decoration: none;
}

body.page-edit-class-hub .edit-class-page-links a:hover {
  text-decoration: underline;
}

body.page-edit-class-hub #class,
body.page-edit-class-hub #groups,
body.page-edit-class-hub #positions {
  scroll-margin-top: var(--site-header-height);
}

body.page-edit-class-hub .edit-positions-frame {
  display: block;
  width: 100%;
  height: min(85vh, 920px);
  min-height: 640px;
  border: none;
  border-radius: var(--radius-card);
  background: transparent;
}

body.page-edit-class-hub #positions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.page-edit-class-hub #positions > h2 {
  flex: 0 0 auto;
  margin: 0;
}

body.page-pop-stats .pop-stats-section .pop-stats-section {
  margin-top: 16px;
}

body.page-pop-stats .pop-progress-page-intro {
  margin: 0 0 12px;
  font-size: var(--font-size-resource-page-intro);
  font-weight: 600;
  line-height: var(--line-height-body);
  text-align: left;
  opacity: 0.92;
}

body.page-pop-stats .pop-progress-page-links {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  text-align: left;
}

body.page-pop-stats .pop-progress-page-links a {
  color: var(--color-link);
  font-size: var(--pop-progress-size-body);
  font-weight: 700;
  text-decoration: none;
}

body.page-pop-stats .pop-progress-page-links a:hover {
  text-decoration: underline;
}

body.page-pop-stats #pop-stats,
body.page-pop-stats #threshold,
body.page-pop-stats #avatar-options {
  scroll-margin-top: var(--site-header-height);
}

body.page-pop-stats .progress-threshold-intro,
body.page-pop-stats .avatar-options-intro {
  margin: 0 0 16px;
  font-size: var(--font-size-resource-page-intro);
  font-weight: 600;
  line-height: var(--line-height-body);
  opacity: 0.92;
}

body.page-pop-stats #threshold .field,
body.page-pop-stats #avatar-options-form {
  margin-top: 12px;
}

body.page-pop-stats #avatar-options .avatar-options-preview {
  margin-top: 20px;
}

body.page-pop-stats .pop-stats-status,
body.page-pop-stats .avatar-options-status {
  margin: 0 0 16px;
  font-size: var(--pop-progress-size-meta);
  font-weight: 600;
  text-align: center;
  opacity: 0.85;
}

body.page-pop-stats .pop-stats-card {
  text-align: center;
}

body.page-pop-stats .pop-stats-intro {
  margin: 8px 0 24px;
  font-size: var(--font-size-resource-page-intro);
  font-weight: 600;
  line-height: var(--line-height-body);
  text-align: center;
  opacity: 0.85;
}

body.page-pop-stats .pop-progress-page-stack > .setup-card > h1,
body.page-pop-stats .pop-stats-content > .setup-card > h2 {
  text-align: center;
}

body.page-pop-stats .pop-stats-content {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 24px;
  width: 100%;
}

body.page-pop-stats .pop-stats-content > .pop-stats-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
  margin: 0;
  padding: 20px;
  border: none;
  border-radius: var(--radius-card);
  background: var(--panel-nested-fill);
  text-align: center;
}

body.page-pop-stats .pop-stats-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
  text-align: center;
}

body.page-pop-stats .pop-stats-section--class-total {
  margin-bottom: 0;
}

body.page-pop-stats .pop-stats-card > h1 {
  margin: 0;
  font-size: var(--font-size-resource-page-title);
  font-weight: 700;
  line-height: var(--line-height-tight);
  text-align: center;
}

body.page-pop-stats h2.pop-stats-heading,
body.page-pop-stats h3.pop-stats-heading,
body.page-pop-stats .pop-stats-section--class-total .pop-stats-heading {
  margin: 0 0 12px;
  font-size: var(--font-size-resource-section);
  font-weight: 700;
  line-height: var(--line-height-tight);
  text-align: center;
}

body.page-pop-stats .pop-stats-section > .pop-stats-heading + * {
  margin-top: 0;
}

body.page-pop-stats .pop-stats-section > :not(.pop-stats-heading) + * {
  margin-top: 8px;
}

body.page-pop-stats .pop-stats-value {
  margin: 0;
}

body.page-pop-stats .pop-stats-section--class-total .pop-count-display {
  font-size: clamp(2.75rem, 8vw, 4rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  -webkit-text-stroke: 0.05em var(--color-cauldron-green);
  paint-order: stroke fill;
  text-shadow: var(--shadow-text);
}

body.page-pop-stats .pop-stats-list-value.pop-count-display,
body.page-pop-stats #pop-progress-threshold.pop-count-display {
  font-size: clamp(1.5rem, 4.5vw, 2.35rem);
}

body.page-pop-stats .threshold-display-row,
body.page-progress-threshold .threshold-display-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.threshold-edit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 16px;
  border: var(--border-button);
  border-radius: var(--radius-pill);
  background: rgb(255 255 255 / 22%);
  color: var(--color-text);
  font-family: inherit;
  font-size: var(--font-size-small);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.threshold-edit-button:hover {
  background: rgb(255 255 255 / 32%);
}

body.page-progress-threshold .progress-threshold-card {
  width: min(100%, var(--panel-max-narrow));
}

body.page-pop-progress .rewards-section.progress-threshold-card {
  width: 100%;
}

body.page-progress-threshold .progress-threshold-intro {
  margin: 0 0 20px;
  font-size: var(--font-size-resource-page-intro);
  font-weight: 600;
  line-height: var(--line-height-body);
  opacity: 0.92;
}

body.page-progress-threshold .progress-threshold-status {
  margin: 0 0 12px;
  font-size: var(--font-size-body);
  font-weight: 600;
  opacity: 0.85;
}

body.page-pop-progress .rewards-page-card {
  width: min(100%, var(--panel-max-wide));
}

body.page-pop-progress .rewards-page-intro {
  margin: 0 0 24px;
  font-size: var(--font-size-resource-page-intro);
  font-weight: 600;
  line-height: var(--line-height-body);
  text-align: center;
  opacity: 0.85;
}

body.page-pop-progress .pop-progress-overview-body {
  margin: 0 0 28px;
  font-size: var(--font-size-body);
  font-weight: 600;
  line-height: var(--line-height-body);
}

body.page-pop-progress .pop-progress-overview-body >
:not(.pop-progress-overview-accent):not(.pop-progress-overview-callout) {
  opacity: 0.92;
}

body.page-pop-progress .pop-progress-overview-body p {
  margin: 0 0 14px;
}

body.page-pop-progress .pop-progress-overview-body p:last-child {
  margin-bottom: 0;
}

body.page-pop-progress .pop-progress-overview-accent {
  color: var(--color-cauldron-green);
}

body.page-pop-progress .pop-progress-overview-defaults {
  margin-top: 42px;
}

body.page-pop-progress .setup-card .pop-progress-overview-callout {
  color: #fff;
  font-size: calc(var(--font-size-body) * 1.9);
  font-weight: 700;
  line-height: var(--line-height-tight);
  -webkit-text-stroke: 0.05em var(--color-cauldron-green);
  paint-order: stroke fill;
  text-shadow: var(--shadow-text);
}

body.page-pop-progress .pop-progress-overview-steps {
  margin: 0 0 14px;
  padding-left: 1.4em;
}

body.page-pop-progress .pop-progress-overview-steps li {
  margin: 0 0 8px;
}

body.page-pop-progress .pop-progress-overview-steps li:last-child {
  margin-bottom: 0;
}

body.page-pop-progress .rewards-section {
  margin: 0 0 24px;
  padding: 20px;
  border: none;
  border-radius: var(--radius-card);
  background: var(--panel-nested-fill);
  scroll-margin-top: calc(var(--site-header-height) + 12px);
}

body.page-pop-progress .rewards-section:last-child {
  margin-bottom: 0;
}

body.page-pop-progress .expandable-card-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin: 0 0 16px;
}

body.page-pop-progress .expandable-card-heading > :is(h1, h2) {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--font-size-resource-section);
  font-weight: 700;
  line-height: var(--line-height-tight);
}

body.page-pop-progress .expandable-card-teaser {
  margin: 0 0 16px;
  font-size: var(--font-size-body);
  font-weight: 600;
  line-height: var(--line-height-body);
  opacity: 0.92;
}

body.page-pop-progress .expandable-card-teaser[hidden] {
  display: none;
}

body.page-pop-progress .expandable-card-body {
  margin: 0;
}

body.page-pop-progress .expandable-card-body[hidden] {
  display: none;
}

body.page-pop-progress .expandable-card-toggle.continue-button {
  width: auto;
  flex: 0 0 auto;
  padding: 8px 18px;
  white-space: nowrap;
}

body.page-pop-progress [data-expandable-card].is-collapsed .expandable-card-heading {
  margin-bottom: 12px;
}

body.page-pop-progress .pop-progress-intro {
  margin: 0 0 20px;
  font-size: var(--font-size-resource-page-intro);
  font-weight: 600;
  line-height: var(--line-height-body);
  opacity: 0.92;
}

body.page-pop-progress:not(.is-minimal-text) .is-mt-only,
body.page-pop-progress.is-minimal-text .is-standard-only {
  display: none !important;
}

body.page-pop-progress .pop-progress-celebration-groups {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px;
}

body.page-pop-progress .pop-progress-celebration-groups[hidden] {
  display: none;
}

body.page-pop-progress .pop-progress-celebration-group-item {
  margin: 0;
  flex: 0 1 auto;
  max-width: 140px;
}

body.page-pop-progress .pop-progress-celebration-group-item .pop-progress-option {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

body.page-pop-progress .pop-progress-celebration-group-item .pop-progress-group-name {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 120px;
  word-break: break-word;
}

body.page-pop-progress .pop-progress-celebration-group-item .pop-progress-group-name.has-group-image {
  min-height: 120px;
}

body.page-pop-progress
  .pop-progress-celebration-group-item
  .pop-progress-group-name.has-group-image
  .group-identity-image {
  max-height: 120px;
  max-width: 120px;
}

body.page-pop-progress .pop-targets-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0 0 16px;
}

body.page-pop-progress .pop-target-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid rgb(255 255 255 / 18%);
}

body.page-pop-progress .pop-target-card:first-child {
  border-top: 0;
  padding-top: 0;
}

body.page-pop-progress .pop-target-group-name.has-group-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

body.page-pop-progress .pop-target-group-name.has-group-image .group-identity {
  width: auto;
  height: auto;
}

body.page-pop-progress .pop-target-group-name.has-group-image .group-identity--with-label {
  flex-direction: column;
  gap: 6px;
}

body.page-pop-progress .pop-target-group-name.has-group-image .group-identity-image {
  max-width: min(100%, 5.5rem);
  max-height: 4.25rem;
}

body.page-pop-progress .pop-target-group-name.has-group-image .group-identity-label {
  font-size: var(--font-size-body);
  font-weight: 700;
  line-height: var(--line-height-tight);
  text-align: center;
  text-shadow: var(--shadow-text);
}

body.page-pop-progress .pop-target-score {
  margin: 0;
  font-size: var(--font-size-body);
  font-weight: 600;
}

body.page-pop-progress .pop-target-reward-image {
  max-width: 12rem;
}

body.page-pop-progress .pop-targets-empty {
  margin: 0;
  font-weight: 600;
  opacity: 0.85;
}

body.page-pop-progress .pop-progress-status {
  margin: 0 0 12px;
  font-size: var(--font-size-body);
  font-weight: 600;
  opacity: 0.85;
}

body.page-pop-progress .pop-progress-content {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

body.page-pop-progress .pop-progress-section,
body.page-pop-progress .pop-progress-options {
  margin: 0;
  padding: 0;
  border: 0;
}

body.page-pop-progress .pop-progress-heading {
  margin: 0 0 10px;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: var(--line-height-tight);
}

body.page-pop-progress .pop-progress-value {
  margin: 0;
  font-size: clamp(1.5rem, 4.5vw, 2.35rem);
  font-weight: 800;
  line-height: 1;
}

body.page-pop-progress .threshold-display-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

body.page-pop-progress .pop-progress-groups {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
}

body.page-pop-progress .pop-progress-group-item {
  display: flex;
  flex: 1 1 11rem;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  min-width: min(100%, 11rem);
  max-width: 100%;
  padding: 12px 14px;
  border: 2px solid rgb(255 255 255 / 45%);
  border-radius: var(--radius-card);
  background: rgb(var(--panel-tint-purple) / var(--panel-op-nest));
  box-sizing: border-box;
}

body.page-pop-progress .pop-progress-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body.page-pop-progress .pop-progress-group-name {
  font-weight: 700;
}

body.page-pop-progress .pop-progress-group-count {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
}

body.page-pop-progress .pop-progress-group-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body.page-pop-progress .pop-progress-group-meta-line {
  margin: 0;
  font-size: var(--font-size-small);
  font-weight: 700;
  line-height: 1.35;
}

body.page-pop-progress .pop-progress-group-meta-line.is-at-threshold {
  color: var(--color-cauldron-green);
}

body.page-pop-progress .pop-progress-group-meta-line.is-below-threshold {
  color: var(--color-warning);
}

body.page-pop-progress .pop-progress-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.page-pop-progress .pop-progress-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  cursor: pointer;
}

body.page-pop-progress .pop-progress-option input {
  margin-top: 3px;
  flex: 0 0 auto;
}

body.page-pop-progress .pop-progress-recommended {
  font-weight: 600;
  opacity: 0.85;
}

body.page-pop-progress .pop-progress-actions {
  margin-top: 4px;
}

body.page-pop-progress .pop-progress-actions .continue-button {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  box-sizing: border-box;
  text-align: center;
  text-decoration: none;
}

body.page-pop-progress .pop-progress-actions .edit-cancel-button {
  flex: 0 1 auto;
  width: auto;
  min-width: 0;
  box-sizing: border-box;
  text-align: center;
  text-decoration: none;
}

body.page-avatar-options .avatar-options-intro {
  margin: 0 0 20px;
  font-size: var(--font-size-resource-page-intro);
  font-weight: 600;
  line-height: var(--line-height-body);
  opacity: 0.92;
}

body.page-avatar-options .avatar-options-status {
  margin: 0 0 12px;
  font-size: var(--font-size-body);
  font-weight: 600;
  opacity: 0.85;
}

body.page-avatar-options .avatar-options-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 720px) {
  body.page-avatar-options .avatar-options-groups {
    grid-template-columns: 1fr;
  }
}

body.page-avatar-options .avatar-options-group {
  min-width: 0;
}

body.page-avatar-options .avatar-options-group-heading {
  margin: 0 0 6px;
  font-size: var(--font-size-body);
  font-weight: 700;
}

body.page-avatar-options .avatar-options-group-description {
  margin: 0 0 10px;
  font-size: var(--font-size-small);
  font-weight: 600;
  opacity: 0.85;
}

body.page-avatar-options .avatar-options-choices {
  display: grid;
  gap: 8px;
}

body.page-avatar-options .avatar-options-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--font-size-body);
  font-weight: 600;
  cursor: pointer;
}

body.page-avatar-options .avatar-options-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--colour-primary);
}

body.page-avatar-options .avatar-options-choice--required {
  opacity: 0.92;
  cursor: default;
}

body.page-avatar-options .avatar-options-choice--required .avatar-options-checkbox {
  cursor: not-allowed;
}

body.page-avatar-options .avatar-options-preview {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 2px solid rgb(45 38 64 / 12%);
}

body.page-avatar-options .avatar-options-preview-heading {
  margin: 0 0 8px;
  font-size: var(--font-size-body);
  font-weight: 700;
}

body.page-avatar-options .avatar-options-preview-intro {
  margin: 0 0 16px;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: var(--line-height-body);
  opacity: 0.85;
}

body.page-avatar-options .avatar-options-preview-shell {
  box-sizing: border-box;
  padding: clamp(16px, 3vw, 24px);
  border: 3px solid rgb(255 255 255 / 55%);
  border-radius: var(--radius-card);
  background: rgb(0 0 0 / 22%);
  backdrop-filter: blur(6px);
  color: #fff;
}

body.page-avatar-options .avatar-options-preview-layout {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: clamp(16px, 3vw, 28px);
  align-items: center;
}

body.page-avatar-options .avatar-options-preview-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

body.page-avatar-options .avatar-options-preview-avatar .pupil-avatar-card {
  width: 100%;
  max-width: 220px;
}

body.page-avatar-options .avatar-options-preview-avatar .pupil-randomise-button {
  width: 100%;
  max-width: 220px;
  margin-top: 0;
}

body.page-avatar-options .avatar-options-preview-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

body.page-avatar-options .avatar-options-preview-controls .pupil-selector {
  flex: 0 0 auto;
}

@media (max-width: 720px) {
  body.page-avatar-options .avatar-options-preview-layout {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  body.page-avatar-options .avatar-options-preview-controls {
    width: 100%;
  }
}

body.page-pop-stats .avatar-options-group-heading,
body.page-pop-stats .avatar-options-preview-heading {
  margin: 0 0 6px;
  font-size: var(--pop-progress-size-section);
  font-weight: 700;
  line-height: var(--line-height-tight);
}

body.page-pop-stats .avatar-options-preview-heading {
  margin-bottom: 8px;
}

body.page-pop-stats .avatar-options-group-description,
body.page-pop-stats .avatar-options-preview-intro,
body.page-pop-stats .pop-stats-hint {
  margin: 0 0 10px;
  font-size: var(--pop-progress-size-meta);
  font-weight: 600;
  line-height: var(--line-height-body);
  opacity: 0.85;
}

body.page-pop-stats .pop-stats-hint {
  margin: 0;
}

body.page-pop-stats .avatar-options-preview-intro {
  margin: 0 0 16px;
}

body.page-pop-stats .avatar-options-choice,
body.page-pop-stats .pop-stats-list-name,
body.page-pop-stats #threshold .field label {
  font-size: var(--pop-progress-size-body);
}

body.page-pop-stats .avatar-options-status {
  font-size: var(--pop-progress-size-meta);
}

body.page-pop-stats .pop-stats-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(var(--pop-stats-list-cols, 4), minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

body.page-pop-stats .pop-stats-list-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  padding: 10px 8px;
  border: var(--border-subtle);
  border-radius: var(--radius-card);
  background: var(--resource-display-card-fill);
}

body.page-pop-stats .pop-stats-list-item:only-child {
  grid-column: 1 / -1;
}

body.page-pop-stats .pop-stats-list-name {
  font-weight: 700;
  text-align: center;
  line-height: var(--line-height-tight);
  overflow-wrap: anywhere;
}

/* MT/MTI: group images are the identity — make them a clear card focus */
body.page-pop-stats .pop-stats-list-name.has-group-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

body.page-pop-stats .pop-stats-list-name.has-group-image .group-identity {
  width: 100%;
}

body.page-pop-stats .pop-stats-list-name.has-group-image .group-identity-image {
  max-height: clamp(3.75rem, 14vw, 6rem);
  max-width: min(100%, 7.5rem);
}

body.page-pop-stats .pop-stats-threshold {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 0;
}

body.page-pop-stats .pop-stats-threshold-label {
  font-size: var(--font-size-body);
  font-weight: 700;
}

body.page-pop-stats .pop-stats-section--pop-progress .pop-stats-threshold .pop-count-display {
  font-size: clamp(2.75rem, 8vw, 4rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  -webkit-text-stroke: 0.05em var(--color-cauldron-green);
  paint-order: stroke fill;
  text-shadow: var(--shadow-text);
}

body.page-pop-stats .pop-stats-section--pop-progress .pop-stats-threshold .pop-stats-hint {
  margin: 0;
  text-align: center;
}

body.page-pop-stats .pop-stats-progress-list-item {
  gap: 8px;
}

body.page-pop-stats .pop-stats-progress-status {
  margin: 0;
  font-size: var(--font-size-small);
  font-weight: 700;
  line-height: var(--line-height-tight);
  text-align: center;
}

body.page-pop-stats .pop-stats-progress-status.is-at-threshold {
  color: var(--color-cauldron-green);
}

body.page-pop-stats .pop-stats-progress-status.is-below-threshold {
  color: var(--color-warning);
}

body.page-pop-stats .pop-stats-reset-actions {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 8px;
  padding-top: 8px;
}

body.page-pop-stats .pop-stats-reset-button {
  width: min(100%, 320px);
}

@media (max-width: 720px) {
  body.page-pop-stats .pop-stats-list {
    --pop-stats-list-cols: 2;
  }
}

body.page-info .resource-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border: none;
  border-radius: var(--radius-card);
  background: var(--panel-nested-fill);
}

body.page-info .resource-card-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

body.page-info .resource-icon-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 48px;
  height: 48px;
  border: 2px solid var(--color-accent);
  border-radius: 50%;
  background: transparent;
  color: var(--color-accent);
  opacity: 0.85;
}

body.page-info .resource-card:hover .resource-icon-badge,
body.page-info .resource-card:focus-within .resource-icon-badge {
  opacity: 1;
}

body.page-info .resource-icon-badge .teacher-resource-icon {
  width: 32px;
  height: 32px;
}

body.page-info .resource-card-title {
  margin: 0;
  font-size: var(--font-size-resource-section);
  font-weight: 700;
  line-height: var(--line-height-tight);
}

body.page-info .resource-card-description {
  flex: 1 1 auto;
  margin: 0;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: var(--line-height-body);
  opacity: 0.85;
}

body.page-info .resource-card-link {
  display: block;
  width: 100%;
  padding: 10px 16px;
  border: var(--border-button);
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-text-on-accent);
  font-family: inherit;
  font-size: var(--font-size-button-secondary);
  font-weight: 700;
  line-height: var(--line-height-body);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

body.page-info .resource-card-link:hover {
  background: var(--color-accent-hover);
}

/* Legal index */

body.page-info .legal-index-intro {
  margin: 0 0 24px;
  font-size: var(--font-size-resource-page-intro);
  font-weight: 600;
  line-height: var(--line-height-body);
  opacity: 0.9;
}

body.page-info .legal-doc-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 640px) {
  body.page-info .legal-doc-list {
    grid-template-columns: 1fr;
  }
}

body.page-info .legal-doc-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border: none;
  border-radius: var(--radius-card);
  background: var(--panel-nested-fill);
}

body.page-info .legal-doc-title {
  margin: 0;
  font-size: var(--font-size-body);
  font-weight: 700;
  line-height: var(--line-height-tight);
}

body.page-info .legal-doc-description {
  margin: 0;
  flex: 1 1 auto;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: var(--line-height-body);
  opacity: 0.85;
}

body.page-info .legal-doc-link {
  display: block;
  width: 100%;
  padding: 10px 16px;
  border: var(--border-button);
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-text-on-accent);
  font-family: inherit;
  font-size: var(--font-size-button-secondary);
  font-weight: 700;
  line-height: var(--line-height-body);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

body.page-info .legal-doc-link:hover {
  background: var(--color-accent-hover);
}

/* Welcome page */

body.page-welcome {
  --welcome-text-dark: #1a2e1a;
  --welcome-text-muted: rgb(26 46 26 / 72%);
  --welcome-surface: #f4f7ef;
  --welcome-surface-muted: #e8efe0;
  --welcome-band-light: var(--welcome-surface-muted);
  --welcome-band-dark: #047857;
  --welcome-hero-gradient: linear-gradient(
    135deg,
    #142418 0%,
    #1f4a34 42%,
    #1a2e1a 100%
  );
  --welcome-max-width: 72rem;
  color: var(--welcome-text-dark);
  background: var(--welcome-surface);
}

body.page-welcome::before {
  display: none;
}

body.page-welcome a {
  color: inherit;
}

body.page-welcome .welcome-container {
  width: min(100% - 32px, var(--welcome-max-width));
  margin-inline: auto;
}

body.page-welcome .welcome-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: var(--font-size-button);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

body.page-welcome .welcome-btn--primary {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-text-on-accent);
}

body.page-welcome .welcome-btn--primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

body.page-welcome .welcome-btn--outline {
  background: transparent;
  border-color: rgb(255 255 255 / 85%);
  color: #fff;
}

body.page-welcome .welcome-btn--outline:hover {
  background: rgb(255 255 255 / 12%);
}

body.page-welcome .welcome-btn--inverse {
  background: #fff;
  border-color: #fff;
  color: var(--color-cauldron);
}

body.page-welcome .welcome-btn--inverse:hover {
  background: rgb(255 255 255 / 92%);
}

body.page-welcome .welcome-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgb(26 46 26 / 92%);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgb(255 255 255 / 12%);
}

body.page-welcome .welcome-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
}

body.page-welcome .welcome-nav-logo img {
  display: block;
  width: auto;
  height: 52px;
}

body.page-welcome .welcome-nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

body.page-welcome .welcome-nav-link {
  padding: 8px 10px;
  color: #fff;
  font-size: var(--font-size-small);
  font-weight: 700;
  text-decoration: none;
}

body.page-welcome .welcome-nav-link:hover {
  color: var(--color-accent);
}

body.page-welcome .welcome-nav-cta {
  min-height: 42px;
  padding-inline: 18px;
  font-size: var(--font-size-small);
}

body.page-welcome .welcome-nav-cta-link {
  color: var(--color-accent);
  white-space: nowrap;
}

body.page-welcome .welcome-nav-cta-link:hover {
  color: var(--color-accent-hover);
}

body.page-welcome .welcome-login-trigger {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

body.page-welcome .welcome-login-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgb(10 18 12 / 55%);
}

body.page-welcome .welcome-login-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 41;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  width: min(calc(100% - 32px), 360px);
  padding: 28px 24px 22px;
  border: 2px solid rgb(255 255 255 / 28%);
  border-radius: var(--radius-card);
  background: rgb(26 46 26 / 96%);
  box-shadow: 0 18px 48px rgb(0 0 0 / 35%);
  transform: translate(-50%, -50%);
  color: #fff;
  text-align: center;
}

body.page-welcome .welcome-login-dialog[hidden],
body.page-welcome .welcome-login-backdrop[hidden] {
  display: none;
}

body.page-welcome .welcome-login-title {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  line-height: 1.15;
}

body.page-welcome .welcome-login-lead {
  margin: 0;
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  opacity: 0.9;
}

body.page-welcome .welcome-login-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

body.page-welcome .welcome-login-pupil-btn {
  border-color: rgb(255 255 255 / 85%);
  color: #fff;
}

body.page-welcome .welcome-login-pupil-btn:hover {
  background: rgb(255 255 255 / 12%);
}

body.page-welcome .welcome-login-cancel {
  appearance: none;
  margin-top: 2px;
  padding: 8px;
  border: 0;
  background: transparent;
  color: rgb(255 255 255 / 78%);
  font: inherit;
  font-size: var(--font-size-small);
  font-weight: 700;
  cursor: pointer;
}

body.page-welcome .welcome-login-cancel:hover {
  color: #fff;
}

body.page-welcome .welcome-hero {
  background: var(--welcome-hero-gradient);
  color: #fff;
}

body.page-welcome .welcome-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  padding-block: clamp(40px, 7vw, 88px);
}

body.page-welcome .welcome-eyebrow {
  margin: 0 0 12px;
  color: var(--color-accent);
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  text-transform: uppercase;
}

body.page-welcome .welcome-hero-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 4.8vw, 3.35rem);
  font-weight: 700;
  line-height: 1.08;
  text-shadow: var(--shadow-text);
}

body.page-welcome .welcome-hero-subtitle,
body.page-welcome .welcome-section-lead {
  margin: 0;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: 600;
  line-height: 1.55;
}

body.page-welcome .welcome-hero-subtitle {
  color: rgb(255 255 255 / 88%);
  max-width: 38rem;
  margin-inline: auto;
  text-align: center;
}

body.page-welcome .welcome-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

body.page-welcome .welcome-hero-visual-frame {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: clamp(280px, 38vw, 460px);
  padding: clamp(12px, 2vw, 20px);
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: calc(var(--radius-card) + 8px);
  background:
    radial-gradient(circle at 50% 35%, rgb(25 244 171 / 18%) 0%, transparent 58%),
    rgb(255 255 255 / 8%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 18%);
}

body.page-welcome .welcome-hero-cauldron-wrap {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
}

body.page-welcome .welcome-hero-cauldron {
  display: block;
  width: 100%;
  height: clamp(240px, 34vw, 420px);
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
}

body.page-welcome .welcome-hero-cauldron-hint {
  position: absolute;
  top: clamp(12px, 4%, 28px);
  right: clamp(8px, 6%, 36px);
  z-index: 1;
  margin: 0;
  padding: 8px 14px;
  border: 2px solid rgb(255 255 255 / 70%);
  border-radius: 999px;
  background: var(--group-color-4);
  color: var(--color-text);
  font-size: clamp(0.875rem, 1.6vw, 1.0625rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  text-shadow: none;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 4px 10px rgb(0 0 0 / 18%);
  animation: welcome-hero-hint-bounce 1.4s ease-in-out infinite;
  transition: opacity 220ms ease, transform 220ms ease;
}

body.page-welcome .welcome-hero-cauldron-hint.is-dismissed {
  opacity: 0;
  transform: translateY(4px) scale(0.96);
  animation: none;
}

@keyframes welcome-hero-hint-bounce {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

body.page-welcome .welcome-trust {
  border-block: 1px solid rgb(255 255 255 / 12%);
}

body.page-welcome .welcome-band--light.welcome-trust {
  border-block-color: rgb(26 46 26 / 10%);
}

body.page-welcome .welcome-trust-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding-block: 18px;
}

body.page-welcome .welcome-trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

body.page-welcome .welcome-trust-icon {
  flex: 0 0 auto;
  font-size: 1.25rem;
  line-height: 1;
}

body.page-welcome .welcome-trust-item p {
  margin: 0;
  font-size: var(--font-size-caption);
  font-weight: 700;
  line-height: 1.35;
}

body.page-welcome .welcome-section {
  padding-block: clamp(48px, 7vw, 80px);
}

body.page-welcome .welcome-band--light {
  background: var(--welcome-band-light);
  color: var(--welcome-text-dark);
}

body.page-welcome .welcome-band--dark {
  background: var(--welcome-band-dark);
  color: #fff;
}

body.page-welcome .welcome-band--dark .welcome-section-header h2 {
  color: #fff;
  text-shadow: var(--shadow-text);
}

body.page-welcome .welcome-band--dark .welcome-section-lead,
body.page-welcome .welcome-band--dark .welcome-section-header .welcome-section-lead {
  color: rgb(255 255 255 / 90%);
}

body.page-welcome .welcome-section--muted {
  background: var(--welcome-surface-muted);
}

body.page-welcome .welcome-section--irish {
  background:
    linear-gradient(180deg, rgb(25 244 171 / 8%) 0%, transparent 100%),
    repeating-linear-gradient(
      -45deg,
      rgb(26 46 26 / 4%) 0,
      rgb(26 46 26 / 4%) 2px,
      transparent 2px,
      transparent 10px
    ),
    #eef4e8;
}

body.page-welcome .welcome-section-header {
  max-width: 44rem;
  margin: 0 auto 32px;
  text-align: center;
}

body.page-welcome .welcome-section-header:last-child {
  margin-bottom: 0;
}

body.page-welcome .welcome-section-header h2 {
  margin: 0 0 12px;
  font-size: clamp(1.65rem, 3.4vw, 2.35rem);
  font-weight: 700;
  line-height: 1.15;
}

body.page-welcome .welcome-section-header .welcome-section-lead {
  color: var(--welcome-text-muted);
}

body.page-welcome .welcome-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: welcome-step;
}

body.page-welcome .welcome-step {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border: 1px solid rgb(26 46 26 / 10%);
  border-radius: var(--radius-card);
  background: #fff;
  box-shadow: 0 10px 24px rgb(26 46 26 / 6%);
}

body.page-welcome .welcome-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-text-on-accent);
  font-size: var(--font-size-body);
  font-weight: 700;
}

body.page-welcome .welcome-step h3,
body.page-welcome .welcome-feature h3,
body.page-welcome .welcome-irish-card h3 {
  margin: 0;
  font-size: var(--font-size-body);
  font-weight: 700;
  line-height: var(--line-height-tight);
}

body.page-welcome .welcome-step p,
body.page-welcome .welcome-feature p,
body.page-welcome .welcome-irish-card p {
  margin: 0;
  color: var(--welcome-text-muted);
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: 1.55;
}

body.page-welcome .welcome-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

body.page-welcome .welcome-feature {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  border: 1px solid rgb(26 46 26 / 10%);
  border-radius: var(--radius-card);
  background: #fff;
}

body.page-welcome .welcome-feature-list {
  margin: 0;
  padding-left: 1.25rem;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: 600;
  line-height: 1.55;
  color: inherit;
}

body.page-welcome .welcome-feature-list li + li {
  margin-top: 0.25rem;
}

body.page-welcome .welcome-irish-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

body.page-welcome .welcome-irish-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  border: 1px solid rgb(26 46 26 / 10%);
  border-radius: var(--radius-card);
  background: rgb(255 255 255 / 82%);
}

body.page-welcome .welcome-irish-card .welcome-btn {
  margin-top: auto;
  align-self: flex-start;
  min-height: 42px;
  padding-inline: 18px;
  font-size: var(--font-size-small);
}

body.page-welcome .welcome-pricing-copy {
  max-width: 40rem;
  margin: 0 auto;
  text-align: center;
}

body.page-welcome .welcome-pricing-amount {
  margin: 0;
  font-size: clamp(1.15rem, 2.6vw, 1.45rem);
  font-weight: 700;
  line-height: 1.4;
  text-wrap: balance;
}

body.page-welcome .welcome-pricing-paycheque {
  display: inline-block;
  margin-top: 0.15em;
  color: #c9a0ff;
  font-size: 1.18em;
  font-weight: 800;
  line-height: 1.3;
  text-shadow: 0 2px 10px rgb(0 0 0 / 35%), 0 1px 2px rgb(0 0 0 / 45%);
}

body.page-welcome .welcome-pricing-alt {
  margin: 12px 0 0;
  color: var(--welcome-text-muted);
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  font-weight: 600;
  line-height: 1.45;
}

body.page-welcome .welcome-pricing-alt a {
  color: var(--color-accent);
}

body.page-welcome .welcome-final-cta {
  background: var(--welcome-hero-gradient);
  color: #fff;
}

body.page-welcome .welcome-final-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-block: clamp(48px, 7vw, 80px);
  text-align: center;
}

body.page-welcome .welcome-final-inner h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3.6vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
}

body.page-welcome .welcome-final-trial-note {
  margin: 0;
  max-width: 34rem;
  color: var(--color-cauldron);
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: 700;
  line-height: 1.55;
}

body.page-welcome .welcome-final-inner .welcome-section-lead {
  color: rgb(255 255 255 / 88%);
  max-width: 34rem;
}

body.page-welcome .welcome-footer {
  background: #142418;
  color: rgb(255 255 255 / 82%);
}

body.page-welcome .welcome-footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-block: 28px 36px;
  text-align: center;
}

body.page-welcome .welcome-footer-copy,
body.page-welcome .welcome-footer-tagline {
  margin: 0;
  font-size: var(--font-size-caption);
  font-weight: 600;
}

body.page-welcome .welcome-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 10px;
}

body.page-welcome .welcome-footer-links a {
  color: var(--color-accent);
  font-size: var(--font-size-caption);
  font-weight: 700;
  text-decoration: none;
}

body.page-welcome .welcome-footer-links a:hover {
  color: var(--color-accent-hover);
}

.grupop-social-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.grupop-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: var(--color-accent);
  background: rgb(255 255 255 / 8%);
  text-decoration: none;
  transition:
    color 0.15s ease,
    background 0.15s ease;
}

.grupop-social-link:hover {
  color: var(--color-accent-hover);
  background: rgb(255 255 255 / 14%);
}

.grupop-social-link svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: currentColor;
}

body.page-welcome .welcome-footer .grupop-social-link {
  background: transparent;
}

body.page-welcome .welcome-footer .grupop-social-link:hover {
  background: rgb(255 255 255 / 8%);
}

body.page-community .community-social-lead {
  margin: 0 0 16px;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  color: rgb(255 255 255 / 88%);
}

body.page-community .community-social .grupop-social-links {
  margin-top: 2px;
}

body.page-community .community-quotes-aside {
  margin: -6px 0 14px;
  font-size: var(--font-size-caption);
  font-weight: 500;
  line-height: 1.45;
  color: rgb(255 255 255 / 72%);
}

body.page-community .community-quotes-aside a {
  color: var(--color-accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

body.page-community .community-quotes-aside a:hover {
  color: var(--color-accent-hover);
}

body.page-community .community-quotes-carousel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

body.page-community .community-quotes-viewport {
  overflow: hidden;
  width: 100%;
}

body.page-community .community-quotes-track {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  transition: transform 0.55s ease;
  will-change: transform;
}

body.page-community .community-quote-card {
  box-sizing: border-box;
  padding: 0 6px;
  min-width: 0;
}

body.page-community .community-quote-card blockquote {
  margin: 0;
  min-height: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-card);
  background: rgb(255 255 255 / 10%);
  text-align: center;
}

body.page-community .community-quote-card p {
  margin: 0 0 10px;
  font-size: var(--font-size-small);
  font-weight: 700;
  line-height: 1.4;
  color: rgb(255 255 255 / 95%);
}

body.page-community .community-quote-card footer {
  font-size: var(--font-size-caption);
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-accent);
}

body.page-community .community-quotes-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

body.page-community .community-quotes-prev,
body.page-community .community-quotes-next {
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-size: var(--font-size-caption);
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  background: rgb(255 255 255 / 12%);
}

body.page-community .community-quotes-prev:hover,
body.page-community .community-quotes-next:hover {
  background: rgb(255 255 255 / 18%);
}

body.page-community .community-quotes-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

body.page-community .community-quotes-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgb(255 255 255 / 28%);
}

body.page-community .community-quotes-dot.is-active {
  background: var(--color-accent);
}

@media (prefers-reduced-motion: reduce) {
  body.page-community .community-quotes-track {
    transition: none;
  }
}

@media (max-width: 960px) {
  body.page-welcome .welcome-hero-grid,
  body.page-welcome .welcome-steps,
  body.page-welcome .welcome-features,
  body.page-welcome .welcome-trust-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  body.page-welcome .welcome-nav-inner {
    flex-wrap: wrap;
    justify-content: center;
    padding-block: 12px;
  }

  body.page-welcome .welcome-nav-links {
    flex-wrap: nowrap;
    justify-content: center;
    gap: 4px;
  }

  body.page-welcome .welcome-nav-link {
    padding: 6px 6px;
    font-size: 0.85rem;
    white-space: nowrap;
  }

  body.page-welcome .welcome-hero-grid,
  body.page-welcome .welcome-trust-grid,
  body.page-welcome .welcome-steps,
  body.page-welcome .welcome-features {
    grid-template-columns: 1fr;
  }

  body.page-welcome .welcome-hero-actions {
    flex-direction: column;
  }

  body.page-welcome .welcome-hero-actions .welcome-btn {
    width: 100%;
  }

  body.page-welcome .welcome-login-actions .welcome-btn {
    width: 100%;
  }

  body.page-welcome .welcome-trust-item {
    align-items: flex-start;
  }
}

/* About page */

body.page-about .about-page-card {
  width: min(100%, 52rem);
}

body.page-about .about-document {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

body.page-about .about-intro p,
body.page-about .about-section > p {
  margin: 0 0 12px;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: 1.55;
}

body.page-about .about-intro p:last-child,
body.page-about .about-section > p:last-child {
  margin-bottom: 0;
}

body.page-about .about-principles {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

body.page-about .about-principle {
  margin: 0;
  padding: 20px;
  border: none;
  border-radius: var(--radius-card);
  background: var(--panel-nested-fill);
}

body.page-about .about-principle h2 {
  margin: 0 0 8px;
  font-size: var(--font-size-resource-section);
  font-weight: 700;
  line-height: var(--line-height-tight);
}

body.page-about .about-principle p {
  margin: 0 0 10px;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: 1.55;
}

body.page-about .about-list {
  margin: 0;
  padding-left: 1.25rem;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: 1.55;
}

body.page-about .about-list li + li {
  margin-top: 8px;
}

body.page-about .about-signoff {
  margin: 20px 0 0;
  font-weight: 700;
}

body.page-about .about-case-study-link {
  margin: 28px 0 0;
  padding: 16px 18px;
  border-radius: var(--radius-card);
  background: var(--panel-nested-fill);
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
}

/* Behind the scenes / onboarding case study */

body.page-behind-the-scenes .bts-page-card {
  max-width: 42rem;
}

body.page-behind-the-scenes .bts-eyebrow {
  margin: 0 0 8px;
  color: var(--color-accent);
  font-size: var(--font-size-caption);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
}

body.page-behind-the-scenes .bts-page-intro {
  margin: 0 0 24px;
  font-size: var(--font-size-resource-page-intro);
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  color: rgb(255 255 255 / 90%);
}

body.page-behind-the-scenes .bts-scan {
  padding: 20px;
}

body.page-behind-the-scenes .bts-beat + .bts-beat {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgb(255 255 255 / 10%);
}

body.page-behind-the-scenes .bts-beat h2 {
  margin: 0 0 8px;
  font-size: var(--font-size-resource-section);
  font-weight: 700;
  line-height: var(--line-height-tight);
}

body.page-behind-the-scenes .bts-beat p {
  margin: 0;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: 1.55;
}

body.page-behind-the-scenes .bts-proof-lead {
  margin-bottom: 14px !important;
}

body.page-behind-the-scenes .bts-proof-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin: 0;
}

body.page-behind-the-scenes .bts-proof-slot {
  margin: 0;
}

body.page-behind-the-scenes .bts-proof-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-card);
  background: rgb(255 255 255 / 10%);
  cursor: zoom-in;
}

body.page-behind-the-scenes .bts-proof-image:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 4px;
}

body.page-behind-the-scenes .bts-proof-image:fullscreen,
body.page-behind-the-scenes .bts-proof-image:-webkit-full-screen {
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
  background: #0b1220;
  cursor: zoom-out;
}

body.page-behind-the-scenes .bts-proof-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  border-radius: var(--radius-card);
  background: rgb(255 255 255 / 10%);
  color: rgb(255 255 255 / 55%);
  font-size: var(--font-size-caption);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.page-behind-the-scenes .bts-proof-slot figcaption {
  margin-top: 8px;
  font-size: var(--font-size-caption);
  font-weight: 600;
  line-height: 1.4;
  color: rgb(255 255 255 / 82%);
  text-align: center;
}

body.page-behind-the-scenes .bts-proof-note {
  margin-top: 12px !important;
  font-size: var(--font-size-caption) !important;
  font-weight: 600;
  color: rgb(255 255 255 / 70%);
}

body.page-behind-the-scenes .bts-disclosure-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

body.page-behind-the-scenes .bts-disclosure {
  padding: 0;
  overflow: hidden;
}

body.page-behind-the-scenes .bts-disclosure summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  font-weight: 700;
  font-size: var(--font-size-resource-section);
  line-height: var(--line-height-body);
}

body.page-behind-the-scenes .bts-disclosure summary::-webkit-details-marker {
  display: none;
}

body.page-behind-the-scenes .bts-disclosure summary::after {
  content: "+";
  flex: 0 0 auto;
  font-weight: 700;
  opacity: 0.8;
}

body.page-behind-the-scenes .bts-disclosure[open] summary::after {
  content: "−";
}

body.page-behind-the-scenes .bts-disclosure-body {
  padding: 0 16px 16px;
}

body.page-behind-the-scenes .bts-disclosure-body p,
body.page-behind-the-scenes .bts-disclosure-body li {
  margin: 0 0 12px;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: 1.55;
}

body.page-behind-the-scenes .bts-disclosure-body p:last-child,
body.page-behind-the-scenes .bts-disclosure-body ul:last-child {
  margin-bottom: 0;
}

body.page-behind-the-scenes .bts-disclosure-body h3 {
  margin: 16px 0 8px;
  font-size: var(--font-size-small);
  font-weight: 800;
  line-height: 1.35;
  color: var(--color-accent);
}

body.page-behind-the-scenes .bts-disclosure-body h3:first-child {
  margin-top: 0;
}

body.page-behind-the-scenes .bts-disclosure-body ul {
  margin: 0 0 12px;
  padding-left: 1.2em;
}

body.page-behind-the-scenes .bts-closing {
  margin: 24px 0 0;
  font-size: var(--font-size-caption);
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  color: rgb(255 255 255 / 80%);
}

@media (max-width: 640px) {
  body.page-behind-the-scenes .bts-proof-grid {
    grid-template-columns: 1fr;
  }
}

body.page-behind-the-scenes-2 .bts-meta-note {
  font-size: var(--font-size-small);
  color: rgb(255 255 255 / 82%);
}

body.page-behind-the-scenes-2 .bts-scan > h2 {
  margin: 0 0 14px;
  font-size: var(--font-size-resource-section);
  font-weight: 700;
  line-height: var(--line-height-tight);
}

body.page-behind-the-scenes-2 .bts2-summary-list {
  margin: 0;
  padding-left: 1.2em;
}

body.page-behind-the-scenes-2 .bts2-summary-list li {
  margin: 0 0 12px;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: 1.55;
}

body.page-behind-the-scenes-2 .bts2-summary-list li:last-child {
  margin-bottom: 0;
}

body.page-behind-the-scenes-2 .bts2-journey-heading {
  margin: 8px 0 12px;
  font-size: var(--font-size-resource-section);
  font-weight: 700;
  line-height: var(--line-height-tight);
  text-align: center;
}

body.page-behind-the-scenes-2 .bts2-quote {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: var(--radius-card);
  background: rgb(255 255 255 / 10%);
}

body.page-behind-the-scenes-2 .bts2-quote p {
  margin: 0;
  font-style: italic;
}

body.page-behind-the-scenes-2 .bts2-path-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}

body.page-behind-the-scenes-2 .bts2-path-card {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--radius-card);
  background: rgb(255 255 255 / 10%);
}

body.page-behind-the-scenes-2 .bts2-path-label {
  margin: 0 0 6px;
  font-size: var(--font-size-caption);
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-accent);
}

body.page-behind-the-scenes-2 .bts2-path-flow {
  margin: 0;
  font-size: var(--font-size-caption);
  font-weight: 600;
  line-height: 1.45;
}

body.page-behind-the-scenes-2 .bts2-media-slot {
  margin-top: 4px;
}

body.page-behind-the-scenes-2 .bts2-takeaways {
  margin-top: 16px;
  padding: 20px;
}

body.page-behind-the-scenes-2 .bts2-takeaways h2 {
  margin: 0 0 12px;
  font-size: var(--font-size-resource-section);
  font-weight: 700;
  line-height: var(--line-height-tight);
}

body.page-behind-the-scenes-2 .bts2-takeaways > p {
  margin: 0 0 12px;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: 1.55;
}

body.page-behind-the-scenes-2 .bts2-takeaways-list {
  margin: 0;
  padding-left: 1.2em;
}

body.page-behind-the-scenes-2 .bts2-takeaways-list li {
  margin: 0 0 10px;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: 1.55;
}

body.page-behind-the-scenes-2 .bts2-takeaways-list li:last-child {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  body.page-behind-the-scenes-2 .bts2-path-compare {
    grid-template-columns: 1fr;
  }
}

body.page-behind-the-scenes-3 .bts3-quick-table {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.page-behind-the-scenes-3 .bts3-quick-row {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 10px 14px;
  align-items: start;
}

body.page-behind-the-scenes-3 .bts3-quick-label {
  font-size: var(--font-size-caption);
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-accent);
  line-height: 1.4;
}

body.page-behind-the-scenes-3 .bts3-quick-value {
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: 1.55;
}

body.page-behind-the-scenes-3 .bts3-section {
  padding: 16px 18px;
}

body.page-behind-the-scenes-3 .bts3-section h2 {
  margin: 0 0 10px;
  font-size: var(--font-size-resource-section);
  font-weight: 700;
  line-height: var(--line-height-tight);
}

body.page-behind-the-scenes-3 .bts3-section > p {
  margin: 0 0 12px;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: 1.55;
}

body.page-behind-the-scenes-3 .bts3-section > p:last-child {
  margin-bottom: 0;
}

body.page-behind-the-scenes-3 .bts3-nested-disclosure {
  margin-top: 4px;
  background: rgb(255 255 255 / 10%);
}

body.page-behind-the-scenes-3 .bts3-iterations {
  margin: 0;
  padding-left: 1.2em;
}

body.page-behind-the-scenes-3 .bts3-iterations li {
  margin: 0 0 12px;
}

body.page-behind-the-scenes-3 .bts3-iterations li:last-child {
  margin-bottom: 0;
}

body.page-behind-the-scenes-3 .bts3-caveat {
  color: rgb(255 255 255 / 78%);
  font-size: var(--font-size-caption) !important;
}

body.page-behind-the-scenes-3 .bts3-closing-line {
  margin: 20px 0 0;
  font-size: var(--font-size-small);
  font-weight: 700;
  font-style: italic;
  line-height: 1.5;
  text-align: center;
  color: rgb(255 255 255 / 88%);
}

body.page-behind-the-scenes-3 .bts3-coming-next {
  margin: 16px 0 0;
  padding: 14px 16px;
  border-radius: var(--radius-card);
  background: var(--panel-nested-fill);
  font-size: var(--font-size-caption);
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 640px) {
  body.page-behind-the-scenes-3 .bts3-quick-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* Shared Nested D content shell for info pages */
body.page-info .info-nested-card {
  margin: 0;
  padding: 20px;
  border: none;
  border-radius: var(--radius-card);
  background: var(--panel-nested-fill);
  box-sizing: border-box;
}

/* Behind-the-scenes: restore sibling gaps after the shared margin:0 reset */
body.page-behind-the-scenes .info-nested-card.bts-scan {
  margin: 0 0 28px;
}

body.page-behind-the-scenes .bts-disclosure-list > .info-nested-card.bts-disclosure {
  margin: 0 0 28px;
}

body.page-behind-the-scenes .bts-disclosure-list > .info-nested-card.bts-disclosure:last-child {
  margin-bottom: 0;
}

body.page-info .info-social-section {
  margin-top: 28px;
  text-align: center;
}

body.page-info .info-social-section h2 {
  margin: 0 0 16px;
  font-size: var(--font-size-resource-section);
  font-weight: 700;
  line-height: var(--line-height-tight);
}

body.page-info .info-social-lead {
  margin: 0 0 16px;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: 1.5;
  color: rgb(255 255 255 / 88%);
}

body.page-info .info-social-section .grupop-social-links {
  margin-top: 2px;
}

/* Schools guide */

body.page-schools .schools-page-card {
  width: min(100%, 52rem);
}

body.page-schools .schools-page-intro {
  margin: 0 0 24px;
  font-size: var(--font-size-resource-page-intro);
  font-weight: 600;
  line-height: var(--line-height-body);
  text-align: center;
  opacity: 0.85;
}

body.page-schools .schools-document {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

body.page-schools .schools-updated-meta {
  margin: 0 0 4px;
  font-size: var(--font-size-small);
  font-weight: 600;
  opacity: 0.8;
  text-align: center;
}

body.page-schools .schools-document .schools-section.info-nested-card {
  margin: 0;
}

body.page-schools .schools-section h2 {
  margin: 0 0 12px;
  font-size: var(--font-size-resource-page-intro);
  font-weight: 700;
  line-height: var(--line-height-tight);
}

body.page-schools .schools-section h3 {
  margin: 20px 0 8px;
  font-size: var(--font-size-small);
  font-weight: 700;
  line-height: 1.35;
}

body.page-schools .schools-section h3:first-of-type {
  margin-top: 4px;
}

body.page-schools .schools-disclaimer {
  margin-top: 14px;
  font-style: italic;
  opacity: 0.92;
}

body.page-schools .schools-definition {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-card, 12px);
  background: rgb(0 0 0 / 18%);
}

body.page-schools .schools-definition h3 {
  margin: 0 0 6px;
}

body.page-schools .schools-definition p {
  margin: 0;
}

body.page-schools .schools-definition + .schools-definition {
  margin-top: 10px;
}

body.page-schools .schools-section p {
  margin: 0 0 12px;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: 1.55;
}

body.page-schools .schools-section p:last-child {
  margin-bottom: 0;
}

body.page-schools .schools-list {
  margin: 0 0 12px;
  padding-left: 1.25rem;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: 1.55;
}

body.page-schools .schools-list li + li {
  margin-top: 8px;
}

body.page-schools .schools-list--ordered {
  list-style-type: decimal;
}

body.page-schools .schools-table-wrap {
  margin: 0 0 16px;
  overflow-x: auto;
}

body.page-schools .schools-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: var(--line-height-body);
}

body.page-schools .schools-table th,
body.page-schools .schools-table td {
  padding: 10px 12px;
  border: 1px solid rgb(255 255 255 / 22%);
  text-align: left;
  vertical-align: top;
}

body.page-schools .schools-table th {
  background: rgb(255 255 255 / 10%);
  font-weight: 700;
}

body.page-schools .schools-table tbody tr:nth-child(even) {
  background: rgb(255 255 255 / 8%);
}

body.page-schools .schools-download-section {
  padding-top: 8px;
  border-top: 1px solid rgb(255 255 255 / 20%);
}

body.page-schools .schools-download-button {
  display: inline-block;
  padding: 12px 24px;
  border: var(--border-button);
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-text-on-accent);
  font-family: inherit;
  font-size: var(--font-size-button);
  font-weight: 700;
  line-height: var(--line-height-body);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

body.page-schools .schools-download-button:hover {
  background: var(--color-accent-hover);
}

body.page-schools .schools-back-link {
  margin: 24px 0 0;
  font-size: var(--font-size-small);
  font-weight: 600;
  text-align: center;
}

body.page-schools .schools-back-link a {
  color: var(--color-link);
}

/* Legal documents */

body.page-legal-document .legal-document-card {
  width: min(100%, 48rem);
}

body.page-legal-document .legal-page-intro {
  margin: 0 0 20px;
  font-size: var(--font-size-resource-page-intro);
  font-weight: 600;
  line-height: var(--line-height-body);
  text-align: center;
  opacity: 0.85;
}

body.page-legal-document .legal-print-actions {
  margin-bottom: 20px;
}

body.page-legal-document .legal-print-actions--bottom {
  margin-top: 24px;
  margin-bottom: 0;
}

body.page-legal-document .legal-print-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-decoration: none;
  box-sizing: border-box;
}

body.page-legal-document .legal-document-meta {
  margin: 0 0 24px;
  font-size: var(--font-size-small);
  font-weight: 600;
  opacity: 0.8;
}

body.page-legal-document .legal-document-content section {
  margin-bottom: 22px;
}

body.page-legal-document .legal-document-content h2 {
  margin: 0 0 10px;
  font-size: var(--font-size-resource-section);
  font-weight: 700;
  line-height: var(--line-height-tight);
}

body.page-legal-document .legal-document-content h3 {
  margin: 22px 0 10px;
  padding-top: 16px;
  border-top: 1px solid rgb(255 255 255 / 22%);
  font-size: clamp(1.08rem, 2.2vw, 1.28rem);
  font-weight: 700;
  line-height: var(--line-height-tight);
  letter-spacing: 0.01em;
}

body.page-legal-document .legal-document-content h2 + h3 {
  margin-top: 6px;
  padding-top: 0;
  border-top: none;
}

body.page-legal-document .legal-document-content p {
  margin: 0 0 10px;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: 1.55;
}

body.page-legal-document .legal-document-content ul {
  margin: 0 0 12px;
  padding-left: 1.25rem;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: 1.55;
}

body.page-legal-document .legal-document-content li + li {
  margin-top: 8px;
}

body.page-legal-document .legal-table-wrap {
  margin: 12px 0 16px;
  overflow-x: auto;
}

body.page-legal-document .legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: var(--line-height-body);
}

body.page-legal-document .legal-table th,
body.page-legal-document .legal-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgb(255 255 255 / 18%);
  text-align: left;
  vertical-align: top;
}

body.page-legal-document .legal-table th {
  font-weight: 700;
}

body.page-legal-document .legal-table tbody tr:nth-child(even) {
  background: rgb(0 0 0 / 12%);
}

body.page-legal-document .legal-table code {
  font-size: 0.95em;
}

body.page-legal-document .legal-document-back {
  margin: 24px 0 0;
  font-size: var(--font-size-small);
  font-weight: 600;
  text-align: center;
}

body.page-legal-document .legal-document-back a {
  color: var(--color-link);
}

/* Legal hub */

body.page-legal-hub .legal-hub-card {
  width: min(100%, var(--panel-max-wide));
}

body.page-legal-hub .legal-hub-intro {
  margin: 0 0 24px;
  font-size: var(--font-size-resource-page-intro);
  font-weight: 600;
  line-height: var(--line-height-body);
  text-align: center;
  opacity: 0.85;
}

body.page-legal-hub .legal-hub-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.page-legal-hub .legal-hub-link {
  display: block;
  padding: 14px 16px;
  border: none;
  border-radius: var(--radius-card);
  background: rgb(255 255 255 / 10%);
  color: inherit;
  font-size: var(--font-size-resource-section);
  font-weight: 700;
  line-height: var(--line-height-tight);
  text-align: center;
  text-decoration: none;
}

body.page-legal-hub .legal-hub-link:hover,
body.page-legal-hub .legal-hub-link:focus-visible {
  background: rgb(255 255 255 / 16%);
  outline: none;
}

@media print {
  body.page-legal-document {
    background: #fff !important;
    color: #000 !important;
  }

  body.page-legal-document .site-header,
  body.page-legal-document .site-footer,
  body.page-legal-document .legal-print-actions,
  body.page-legal-document .legal-document-back,
  body.page-legal-document .legal-page-intro {
    display: none !important;
  }

  body.page-legal-document .info-page-body,
  body.page-legal-document .legal-document-card {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: #fff !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
  }

  body.page-legal-document .info-nested-card {
    padding: 0 !important;
    background: #fff !important;
  }

  body.page-legal-document .legal-document-card > h1,
  body.page-legal-document .legal-document-content,
  body.page-legal-document .legal-document-content h2,
  body.page-legal-document .legal-document-content h3,
  body.page-legal-document .legal-document-content p,
  body.page-legal-document .legal-document-meta {
    color: #000 !important;
  }

  body.page-legal-document .legal-document-content h3 {
    border-top-color: rgb(0 0 0 / 18%) !important;
  }

  body.page-legal-document .legal-document-card > h1 {
    margin: 0 0 8px !important;
  }

  body.page-legal-document .legal-document-content a {
    color: #000 !important;
    text-decoration: underline;
  }
}

body.page-account .account-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.page-account .account-links .resource-card-link {
  box-sizing: border-box;
}

body.page-account .account-dialog-title {
  margin: 0 0 12px;
  font-size: var(--font-size-subtitle);
  font-weight: 700;
  line-height: var(--line-height-tight);
  text-align: center;
}

body.page-account .account-cancel-dialog {
  width: min(calc(100% - 32px), 34rem);
  max-height: min(90vh, 40rem);
  overflow-y: auto;
}

body.page-account .account-cancel-feedback-intro {
  margin: 0 0 14px;
  font-size: var(--font-size-small);
  line-height: 1.45;
  color: rgb(255 255 255 / 88%);
}

body.page-account .account-cancel-feedback-field {
  margin: 0 0 18px;
}

body.page-account .account-cancel-feedback-label {
  display: block;
  margin: 0 0 8px;
  font-size: var(--font-size-small);
  font-weight: 700;
}

body.page-account .account-cancel-feedback-field textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 6.5rem;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--radius-control, 10px);
  resize: vertical;
  font: inherit;
  font-size: var(--font-size-body);
  line-height: 1.4;
  color: rgb(255 255 255 / 95%);
  background: rgb(255 255 255 / 18%);
}

body.page-account .account-cancel-feedback-field textarea:focus {
  outline: 2px solid rgb(var(--panel-tint-purple) / 70%);
  outline-offset: 1px;
}

body.page-account .account-cancel-feedback-count {
  margin: 6px 0 0;
  font-size: var(--font-size-small);
  line-height: 1.35;
  color: rgb(255 255 255 / 70%);
}

/* Community page */

body.page-community .community-section {
  margin-bottom: 28px;
  padding: 20px;
  border: none;
  border-radius: var(--radius-card);
  background: var(--panel-nested-fill);
}

body.page-community .community-section:last-child {
  margin-bottom: 0;
}

body.page-community .community-section h2 {
  margin: 0 0 16px;
  font-size: var(--font-size-resource-section);
  font-weight: 700;
  line-height: var(--line-height-tight);
}

body.page-community .community-sign-in-note {
  margin: 0 0 20px;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
}

body.page-community .community-sign-in-note a {
  font-weight: 800;
}

body.page-community .community-teasers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 28px;
}

body.page-community .community-teaser {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 0;
  padding: 14px 16px;
  border: none;
  border-radius: var(--radius-card);
  background: var(--panel-nested-fill);
  color: inherit;
  text-decoration: none;
  transition: background 160ms ease;
}

body.page-community .community-teaser:hover,
body.page-community .community-teaser:focus-visible {
  background: rgb(0 0 0 / 28%);
  outline: none;
}

body.page-community .community-teaser-kicker {
  font-size: var(--font-size-small);
  font-weight: 800;
  line-height: 1.2;
  color: var(--color-accent);
}

body.page-community .community-teaser-title {
  font-size: var(--font-size-body);
  font-weight: 700;
  line-height: var(--line-height-tight);
}

body.page-community .community-teaser-copy {
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: 1.35;
  opacity: 0.9;
}

body.page-community #community-poll,
body.page-community #community-feedback,
body.page-community #community-blog-preview {
  scroll-margin-top: calc(var(--site-header-height, 64px) + 12px);
}

body.page-community .community-poll-question {
  margin: 0 0 14px;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: 1.55;
}

body.page-community .community-suggestion-intro {
  margin: 0 0 16px;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: 1.55;
}

body.page-community .community-poll-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
  padding: 0;
  border: none;
  list-style: none;
}

body.page-community .community-poll-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: none;
  border-radius: var(--radius-card);
  background: var(--panel-nested-fill);
}

body.page-community .community-poll-option.is-disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

body.page-community .community-poll-option.is-voted {
  opacity: 0.72;
  background: rgb(255 255 255 / 24%);
}

body.page-community .community-poll-option label {
  flex: 1 1 auto;
  margin: 0;
  font-size: var(--font-size-body);
  font-weight: 600;
  cursor: pointer;
}

body.page-community .community-poll-option.is-disabled label,
body.page-community .community-poll-option.is-voted label {
  cursor: not-allowed;
}

body.page-community .community-poll-count {
  flex-shrink: 0;
  min-width: 2.5rem;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgb(var(--panel-tint-purple) / var(--panel-op-outer));
  font-size: var(--font-size-small);
  font-weight: 700;
  text-align: center;
}

body.page-community .community-poll-actions {
  margin-bottom: 0;
}

body.page-community .community-poll-actions .continue-button {
  width: auto;
  min-width: 160px;
}

body.page-community .community-poll-actions .continue-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

body.page-community .community-message {
  margin: 0;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: var(--line-height-body);
  opacity: 0.85;
}

body.page-community .community-message:not([hidden]) {
  margin-top: 12px;
}

body.page-community .community-message.is-success {
  color: var(--color-accent);
  opacity: 1;
}

body.page-community .community-message.is-restricted,
body.page-community .community-message.is-warning {
  color: var(--color-warning);
  opacity: 1;
}

body.page-community .community-message.is-error {
  color: var(--color-error);
  opacity: 1;
}

body.page-community .community-suggestion-field {
  margin-bottom: 8px;
}

body.page-community .community-suggestion-field textarea {
  width: 100%;
  min-height: 140px;
  padding: 12px 14px;
  border: var(--border-input);
  border-radius: var(--radius-input);
  background: rgb(255 255 255 / 22%);
  color: var(--color-text);
  caret-color: var(--caret-color);
  cursor: var(--cursor-text);
  font-family: inherit;
  font-size: var(--font-size-input);
  font-weight: 600;
  line-height: var(--line-height-body);
  resize: vertical;
}

body.page-community .community-suggestion-field textarea:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

body.page-community .community-char-count {
  margin: 0 0 16px;
  font-size: var(--font-size-small);
  font-weight: 600;
  opacity: 0.85;
}

body.page-community .community-suggestion-actions .continue-button {
  width: auto;
  min-width: 180px;
}

body.page-community .community-suggestion-actions .continue-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

body.page-community .community-hidden-action {
  display: none;
}

@media (max-width: 639px) {
  body.page-community .community-section {
    padding: 16px;
  }

  body.page-community .community-teasers {
    grid-template-columns: 1fr;
  }

  body.page-community .community-poll-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.page-community .community-poll-option {
    flex-wrap: wrap;
  }

  body.page-community .community-poll-actions .continue-button,
  body.page-community .community-suggestion-actions .continue-button {
    width: 100%;
  }
}

/* ── Community blog preview ── */

body.page-community .community-blog-latest {
  margin-bottom: 16px;
}

body.page-community .community-blog-excerpt {
  margin: 8px 0 12px;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: 1.55;
  opacity: 0.92;
}

body.page-community .community-blog-read-more {
  font-size: var(--font-size-small);
  font-weight: 700;
  color: var(--color-accent);
}

body.page-community .community-blog-all-link {
  display: inline-block;
  font-size: var(--font-size-small);
  font-weight: 700;
  color: var(--color-text);
  opacity: 0.72;
}

body.page-community .community-blog-all-link:hover {
  opacity: 1;
}

/* ── Blog page ── */

body.page-blog .blog-page-card {
  width: min(100%, 52rem);
}

body.page-blog .blog-page-intro {
  margin: 0 0 24px;
  font-size: var(--font-size-resource-page-intro);
  font-weight: 600;
  line-height: var(--line-height-body);
  text-align: center;
  opacity: 0.85;
}

body.page-blog .blog-post-card {
  margin: 0 0 16px;
  padding: 0;
  border: none;
  border-radius: var(--radius-card);
  background: var(--panel-nested-fill);
  overflow: hidden;
}

body.page-blog .blog-post-card:last-child {
  margin-bottom: 0;
}

body.page-blog .blog-post-toggle {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  margin: 0;
  padding: 16px 20px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

body.page-blog .blog-post-toggle:hover {
  background: rgb(255 255 255 / 10%);
}

body.page-blog .blog-post-toggle:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}

.blog-post-date {
  margin: 0;
  font-size: var(--font-size-small);
  font-weight: 600;
  opacity: 0.65;
}

.blog-post-title {
  margin: 0;
  font-size: var(--font-size-resource-page-intro);
  font-weight: 700;
  line-height: var(--line-height-tight);
}

body.page-blog .blog-post-card.is-expanded .blog-post-body {
  padding: 0 20px 20px;
}

body.page-blog .blog-post-card.is-collapsed .blog-post-body {
  display: none;
}

.blog-post-body {
  font-size: var(--font-size-body);
  font-weight: 600;
  line-height: var(--line-height-body);
  opacity: 0.92;
}

.blog-post-body p {
  margin: 0 0 14px;
}

.blog-post-body p:last-child {
  margin-bottom: 0;
}

.blog-post-body a {
  color: var(--color-accent);
}

.blog-post-figure {
  margin: 8px 0 18px;
  text-align: center;
}

.blog-post-image {
  display: block;
  width: min(100%, 420px);
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.blog-post-image--half {
  width: min(100%, 210px);
}

.blog-post-inline-image {
  display: block;
  height: 2.7em;
  width: auto;
  margin: 0.2em 0;
}

.blog-post-list {
  margin: 0 0 14px;
  padding-left: 1.35em;
}

.blog-post-list li {
  margin: 0 0 10px;
}

.blog-post-list li:last-child {
  margin-bottom: 0;
}

.blog-post-signoff {
  margin-top: 8px;
  font-weight: 700;
  opacity: 1;
}

body.page-onboarding .onboarding-card {
  max-width: 34rem;
}

body.page-onboarding .onboarding-callout {
  margin: 18px 0;
  padding: 14px 16px;
  border-radius: var(--radius-card, 12px);
  background: var(--panel-nested-fill);
}

body.page-onboarding .onboarding-email-line {
  margin: 0 0 10px;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: 1.55;
}

body.page-onboarding .onboarding-hint {
  margin: 0 0 8px;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: 1.5;
  opacity: 0.92;
}

body.page-onboarding .onboarding-hint:last-child {
  margin-bottom: 0;
}

body.page-onboarding .onboarding-warning {
  margin: 16px 0 0;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: 1.55;
}

body.page-onboarding .onboarding-support {
  margin: 18px 0 0;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: 1.55;
  text-align: center;
}

body.page-onboarding .onboarding-spinner {
  width: 2.25rem;
  height: 2.25rem;
  margin: 20px auto 0;
  border: 3px solid rgb(255 255 255 / 22%);
  border-top-color: rgb(255 255 255 / 92%);
  border-radius: 50%;
  animation: onboarding-spin 0.8s linear infinite;
}

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

.register-plan-fieldset {
  margin: 18px 0 0;
  padding: 0;
  border: none;
}

.register-plan-fieldset .field-heading {
  margin: 0 0 8px;
}

.register-plan-hint {
  margin: 0 0 12px;
}

.register-plan-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 10px;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: 1.45;
}

.register-plan-option input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.register-plan-option:last-of-type {
  margin-bottom: 0;
}

body.page-account .account-subscription-dialog {
  max-width: 28rem;
}

body.page-account .account-subscription-details {
  margin: 0 0 14px;
  display: grid;
  gap: 10px;
}

body.page-account .account-subscription-details div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 8px;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: 1.45;
}

body.page-account .account-subscription-details dt {
  opacity: 0.82;
}

body.page-account .account-subscription-details dd {
  margin: 0;
}

body.page-renew-class .renew-deadline-warning {
  margin-top: 12px;
}

body.page-renew-class .renew-payment {
  margin-top: 8px;
}
