.section-main {
  width: min(1420px, 100%);
  min-width: 0;
  margin-inline: auto;
  padding: 32px clamp(18px, 3vw, 40px) 64px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.section-heading h1 {
  margin: 2px 0 0;
  color: var(--r2-color-navy-900);
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  letter-spacing: -0.04em;
}

.section-heading__copy {
  max-width: 720px;
  margin: 8px 0 0;
  color: #53697d;
  line-height: 1.6;
}

.section-heading__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.section-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.section-stat {
  min-height: 96px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 16px;
}

.section-stat__icon,
.section-card__icon,
.workspace-tool__icon,
.resource-card__icon {
  display: grid;
  place-items: center;
  border-radius: var(--r2-radius-control);
  background: var(--r2-color-blue-100);
  color: var(--r2-color-blue-700);
  font-weight: 900;
}

.section-stat__icon {
  width: 42px;
  height: 42px;
  font-size: 1rem;
}

.section-stat__icon svg {
  display: block;
  width: 24px;
  height: 24px;
}

.section-stat strong,
.section-stat > span:not(.section-stat__icon),
.section-stat > span > span {
  display: block;
}

.section-stat strong {
  color: var(--r2-color-navy-900);
  font-size: 1.05rem;
}

.section-stat > span > span {
  margin-top: 4px;
  color: var(--r2-color-muted);
  font-size: 0.68rem;
}

.challenge-list {
  display: grid;
  gap: 14px;
}

.challenge-list-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 10px minmax(170px, 0.85fr) minmax(260px, 1.5fr) auto;
  align-items: center;
  gap: 18px;
  padding: 18px;
}

.challenge-list-card__stripe {
  width: 8px;
  height: 64px;
  border-radius: 99px;
  background: var(--r2-color-navy-800);
}

.challenge-list-card[data-challenge="Intermediate"] .challenge-list-card__stripe {
  background: var(--r2-color-blue-600);
}

.challenge-list-card[data-challenge="Junior"] .challenge-list-card__stripe {
  background: var(--r2-color-cyan-500);
}

.challenge-list-card[data-challenge="Primary"] .challenge-list-card__stripe {
  background: var(--r2-color-success);
}

.challenge-list-card h2 {
  margin: 0;
  color: var(--r2-color-navy-900);
  font-size: 1.05rem;
}

.challenge-list-card__identity p,
.challenge-list-card__identity small,
.challenge-list-card__facts span,
.challenge-list-card__facts small {
  display: block;
}

.challenge-list-card__identity p {
  margin: 5px 0 0;
  color: var(--r2-color-muted);
  font-size: 0.7rem;
}

.challenge-list-card__identity small {
  margin-top: 7px;
}

.challenge-list-card__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.challenge-list-card__facts strong {
  color: var(--r2-color-navy-900);
  font-size: 0.75rem;
}

.challenge-list-card__facts small {
  margin-top: 4px;
  color: var(--r2-color-muted);
  font-size: 0.63rem;
}

.challenge-list-card__actions {
  min-width: 156px;
  display: grid;
  justify-items: end;
  gap: 10px;
}

.context-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
  padding: 18px;
  border-color: #b7d5ef;
  background: linear-gradient(135deg, #f7fbff, #edf6ff);
}

.context-card .section-card__icon {
  width: 46px;
  height: 46px;
}

.context-card h2 {
  margin: 0;
  color: var(--r2-color-navy-900);
  font-size: 0.92rem;
}

.context-card p {
  margin: 5px 0 0;
  color: #53697d;
  font-size: 0.68rem;
  line-height: 1.5;
}

.workspace-hero {
  overflow: hidden;
  margin-bottom: 16px;
  border: 0;
  background: linear-gradient(130deg, var(--r2-color-navy-950), var(--r2-color-navy-800));
  color: var(--r2-color-white);
}

.workspace-hero__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 22px 24px;
}

.workspace-breadcrumb {
  margin: 0 0 10px;
  color: #a9c9df;
  font-size: 0.68rem;
}

.workspace-breadcrumb a {
  color: #cde9ff;
}

.workspace-hero h1 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
  letter-spacing: -0.035em;
}

.workspace-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 18px;
  margin: 9px 0 0;
  color: #b9ccdb;
  font-size: 0.67rem;
}

.workspace-hero__status {
  min-width: 132px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--r2-radius-control);
  background: rgba(255, 255, 255, 0.08);
  text-align: right;
}

.workspace-hero__status strong,
.workspace-hero__status span {
  display: block;
}

.workspace-hero__status strong {
  font-size: 0.76rem;
}

.workspace-hero__status span {
  margin-top: 4px;
  color: #b9ccdb;
  font-size: 0.58rem;
}

.workspace-tabs {
  display: flex;
  overflow-x: auto;
  padding: 0 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.12);
  scrollbar-width: thin;
}

.workspace-tabs a {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 0 13px;
  border-bottom: 3px solid transparent;
  color: #c5d5e1;
  font-size: 0.66rem;
  font-weight: 750;
  text-decoration: none;
}

.workspace-tabs a:hover {
  color: var(--r2-color-white);
}

.workspace-tabs a[aria-current="page"] {
  border-bottom-color: #66d8ff;
  color: var(--r2-color-white);
}

.workspace-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
  gap: 16px;
}

.workspace-panel {
  min-width: 0;
}

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

.workspace-panel__header {
  padding: 20px 22px 14px;
}

.workspace-panel__header h2 {
  margin: 0;
  color: var(--r2-color-navy-900);
  font-size: 1.15rem;
}

.workspace-panel__header p {
  margin: 6px 0 0;
  color: #53697d;
  font-size: 0.68rem;
  line-height: 1.55;
}

.workspace-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 22px 22px;
}

.workspace-tool {
  min-height: 118px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-content: start;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--r2-color-line);
  border-radius: var(--r2-radius-control);
  background: var(--r2-color-white);
}

.workspace-tool__icon {
  width: 34px;
  height: 34px;
}

.workspace-tool h3 {
  margin: 2px 0 0;
  color: var(--r2-color-navy-900);
  font-size: 0.76rem;
}

.workspace-tool p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--r2-color-muted);
  font-size: 0.64rem;
  line-height: 1.5;
}

.workspace-tool a {
  grid-column: 1 / -1;
  width: fit-content;
  color: var(--r2-color-blue-700);
  font-size: 0.65rem;
  font-weight: 800;
}

.projection-note {
  margin: 0 22px 22px;
}

.hub-loading,
.hub-panel-state {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--r2-color-line);
  border-radius: var(--r2-radius-control);
  background: #f7fbff;
  color: #53697d;
  font-size: 0.7rem;
}

.hub-panel-state {
  margin-inline: 22px;
}

.hub-panel-state[data-state="error"],
.hub-form-error:not(:empty) {
  border-color: #e3a7a7;
  background: #fff5f5;
  color: #8a2020;
}

.hub-context {
  width: fit-content;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--r2-color-blue-100);
  color: var(--r2-color-blue-700) !important;
  font-weight: 750;
}

.hub-actions,
.hub-form,
.hub-panel-body,
.hub-panel-footer {
  margin: 0 22px 22px;
}

.hub-actions {
  padding: 16px;
  border-radius: var(--r2-radius-control);
  background: #f7fbff;
}

.hub-actions h3,
.hub-form h3 {
  margin: 0 0 10px;
  color: var(--r2-color-navy-900);
  font-size: 0.78rem;
}

.hub-actions ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hub-actions li,
.hub-record,
.hub-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--r2-color-line);
  border-radius: var(--r2-radius-control);
  background: white;
}

.hub-actions strong,
.hub-record strong,
.hub-summary strong,
.hub-empty strong {
  color: var(--r2-color-navy-900);
  font-size: 0.72rem;
}

.hub-actions p,
.hub-record p,
.hub-summary p,
.hub-empty p,
.hub-form p {
  margin: 4px 0 0;
  color: var(--r2-color-muted);
  font-size: 0.64rem;
  line-height: 1.5;
}

.hub-actions a {
  color: var(--r2-color-blue-700);
  font-size: 0.65rem;
  font-weight: 800;
}

.hub-record + .hub-record {
  margin-top: 8px;
}

.hub-badge {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--r2-color-blue-100);
  color: var(--r2-color-blue-700);
  font-size: 0.59rem;
  font-weight: 800;
  text-transform: capitalize;
}

.hub-badge--success {
  background: #e9f7ef;
  color: #176c3a;
}

.hub-badge--warning {
  background: #fff4dc;
  color: #805600;
}

.hub-badge--neutral {
  background: #edf1f5;
  color: #53697d;
}

.hub-empty {
  padding: 22px;
  border: 1px dashed #b9c8d5;
  border-radius: var(--r2-radius-control);
  text-align: center;
}

.hub-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--r2-color-line);
  border-radius: var(--r2-radius-control);
}

.hub-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.66rem;
}

.hub-table th,
.hub-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--r2-color-line);
  text-align: left;
}

.hub-table th {
  background: #f7fbff;
  color: #53697d;
  font-size: 0.59rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

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

.hub-release[data-tone="success"] {
  border-color: #a9d8bc;
  background: #f0faf4;
}

.hub-release[data-tone="upcoming"] {
  border-color: #edd39b;
  background: #fffaf0;
}

.hub-release .r2-button {
  margin-top: 12px;
}

.hub-form {
  padding: 16px;
  border: 1px solid var(--r2-color-line);
  border-radius: var(--r2-radius-control);
  background: #f7fbff;
}

.hub-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.hub-form label {
  color: var(--r2-color-navy-900);
  font-size: 0.63rem;
  font-weight: 750;
}

.hub-form input,
.hub-form select {
  width: 100%;
  min-height: 42px;
  display: block;
  margin-top: 5px;
  padding: 8px 10px;
  border: 1px solid #aebfce;
  border-radius: 8px;
  background: white;
  color: var(--r2-color-navy-900);
  font: inherit;
}

.hub-form-error {
  min-height: 1.2em;
  margin: 0 0 10px !important;
  padding: 0;
}

.workspace-aside {
  display: grid;
  gap: 12px;
}

.workspace-aside .r2-card {
  padding: 17px;
}

.workspace-aside h2 {
  margin: 0;
  color: var(--r2-color-navy-900);
  font-size: 0.84rem;
}

.workspace-aside p {
  margin: 7px 0 0;
  color: #53697d;
  font-size: 0.65rem;
  line-height: 1.55;
}

.workspace-aside .r2-button {
  width: 100%;
  margin-top: 13px;
}

.resource-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.resource-filter button[aria-pressed="true"] {
  border-color: var(--r2-color-blue-700);
  background: var(--r2-color-blue-700);
  color: var(--r2-color-white);
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.resource-card {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  padding: 19px;
}

.resource-card[hidden] {
  display: none;
}

.resource-card__icon {
  width: 42px;
  height: 42px;
  margin-bottom: 17px;
  font-size: 1rem;
}

.resource-card h2 {
  margin: 0;
  color: var(--r2-color-navy-900);
  font-size: 0.92rem;
}

.resource-card p {
  margin: 7px 0 14px;
  color: #53697d;
  font-size: 0.66rem;
  line-height: 1.55;
}

.resource-card__meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.resource-card__meta small {
  color: var(--r2-color-muted);
  font-size: 0.58rem;
}

.section-live-region {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 80;
  max-width: min(520px, calc(100vw - 32px));
  padding: 10px 14px;
  border-radius: var(--r2-radius-control);
  background: var(--r2-color-navy-950);
  color: var(--r2-color-white);
  font-size: 0.75rem;
  transform: translateX(-50%);
}

@media (max-width: 1100px) {
  .workspace-layout {
    grid-template-columns: minmax(0, 1fr);
  }

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

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

@media (max-width: 780px) {
  .section-main {
    padding-inline: 16px;
  }

  .section-heading,
  .challenge-list-card,
  .context-card {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: grid;
  }

  .section-heading__actions {
    justify-content: flex-start;
  }

  .section-summary-grid {
    grid-template-columns: 1fr;
  }

  .challenge-list-card__stripe {
    width: 48px;
    height: 6px;
  }

  .challenge-list-card__actions {
    justify-items: stretch;
  }

  .challenge-list-card__actions .r2-button {
    width: 100%;
  }

  .context-card .r2-button {
    width: 100%;
  }

  .workspace-hero__top {
    grid-template-columns: 1fr;
  }

  .workspace-hero__status {
    text-align: left;
  }

  .workspace-tools,
  .workspace-aside,
  .resource-grid,
  .hub-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .section-main {
    padding: 22px 12px 48px;
  }

  .challenge-list-card__facts,
  .workspace-tools {
    grid-template-columns: 1fr;
  }

  .workspace-hero__top {
    padding: 18px;
  }

  .workspace-tabs {
    padding-inline: 6px;
  }

  .workspace-panel__header {
    padding: 18px 16px 12px;
  }

  .workspace-tools {
    padding: 0 16px 18px;
  }

  .projection-note {
    margin: 0 16px 18px;
  }

  .hub-actions,
  .hub-form,
  .hub-panel-body,
  .hub-panel-footer,
  .hub-panel-state {
    margin-inline: 16px;
  }

  .hub-actions li,
  .hub-record,
  .hub-summary {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .workspace-tabs {
    scroll-behavior: auto;
  }
}

.staff-layout,
.school-history-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 22px;
  align-items: start;
}

.staff-layout > div,
.staff-layout > aside,
.school-history-grid > section,
.school-history-grid > aside {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.staff-list { display: grid; gap: 12px; }

.staff-record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--r2-border, #d8e2ea);
  border-radius: 10px;
  background: #fff;
}

.staff-record__identity { display: flex; gap: 12px; align-items: center; min-width: 0; }
.staff-record p { margin: 4px 0 0; color: var(--r2-muted, #536b7d); overflow-wrap: anywhere; }
.staff-record__role { grid-column: 1; font-weight: 700; }
.staff-record__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.staff-role-select { min-height: 40px; padding: 7px 34px 7px 10px; border: 1px solid #aebfcb; border-radius: 7px; background: #fff; color: #102f48; font: inherit; }
.r2-button--danger { border-color: #9b2c2c; color: #842424; background: #fff; }
.r2-button--danger:hover { background: #fff4f4; }

.role-guide { padding: 20px; }
.role-guide h2 { margin: 3px 0 12px; }
.role-guide dl, .role-guide ul { margin: 0; padding: 0; }
.role-guide dl > div { padding: 11px 0; border-top: 1px solid var(--r2-border, #d8e2ea); }
.role-guide dt { font-weight: 800; color: #102f48; }
.role-guide dd { margin: 4px 0 0; color: var(--r2-muted, #536b7d); line-height: 1.45; }
.role-guide li { margin: 8px 0 8px 20px; }

.staff-dialog {
  width: min(560px, calc(100% - 32px));
  padding: 24px;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgb(7 29 51 / 28%);
  color: #102f48;
}
.staff-dialog::backdrop { background: rgb(7 29 51 / 58%); }
.staff-dialog h2 { margin-top: 0; }
.staff-dialog label { display: grid; gap: 7px; font-weight: 700; }
.staff-dialog input { min-height: 44px; padding: 8px 10px; border: 1px solid #aebfcb; border-radius: 7px; font: inherit; }
.resource-memo .memo-copy { padding: 16px; border-radius: 8px; background: #eef5fa; line-height: 1.65; }
.invitation-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #eef4f8; }
.invitation-card { width: min(620px, 100%); padding: clamp(24px, 5vw, 48px); }
.invitation-card .organiser-brand { width: fit-content; margin-bottom: 34px; color: #071d33; }
.invitation-card h1 { margin: 6px 0 14px; color: #071d33; }
.hub-declaration { margin-top: 20px; padding: clamp(16px, 3vw, 24px); border: 1px solid rgb(7 29 51 / 16%); border-radius: 14px; background: #fffdf7; }
.hub-declaration h3 { margin-top: 0; }
.hub-declaration fieldset { display: grid; gap: 12px; border: 1px solid rgb(7 29 51 / 14%); border-radius: 10px; padding: 16px; }
.hub-declaration label { line-height: 1.5; }
.hub-field-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.hub-declaration .hub-fieldset { border: 0; border-radius: 0; margin: 0; padding: 0; }
.hub-fieldset legend { font-weight: 700; }
.resource-centre-group { margin-top: 26px; }
.resource-centre-group > h2 { margin: 0 0 12px; color: #102f48; }
.resource-centre-card { display: flex; flex-direction: column; min-width: 0; padding: 18px; border: 1px solid var(--r2-border, #d8e2ea); border-radius: 12px; background: #fff; }
.resource-centre-card h3 { margin: 4px 0 8px; color: #071d33; }
.resource-centre-card > p { line-height: 1.5; }
.resource-centre-card__meta { margin-top: auto; padding-top: 12px; color: var(--r2-muted, #536b7d); font-size: .875rem; }
.resource-customisation-dialog { width: min(680px, calc(100% - 28px)); max-height: calc(100vh - 28px); overflow: auto; }
.resource-customisation-dialog form { display: grid; gap: 18px; }
.resource-customisation-dialog header { padding-bottom: 14px; border-bottom: 1px solid var(--r2-border, #d8e2ea); }
.resource-customisation-dialog header p:last-child { margin-bottom: 0; line-height: 1.55; color: var(--r2-muted, #536b7d); }
.resource-customisation-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.resource-customisation-fields label { align-content: start; }
.resource-customisation-fields small { color: var(--r2-muted, #536b7d); font-weight: 500; line-height: 1.4; }
.resource-customisation__optional { color: var(--r2-muted, #536b7d); font-size: .85em; font-weight: 500; }
.resource-customisation-error { min-height: 1.5em; margin: 0; color: #9b1c1c; font-weight: 750; }
.resource-customisation-fields input[aria-invalid="true"] { border-color: #b42318; outline: 3px solid rgb(180 35 24 / 18%); }
.resource-preview-dialog { width: min(860px, calc(100% - 28px)); max-height: calc(100vh - 28px); overflow: auto; }
.resource-preview { max-width: 720px; margin: 0 auto; }
.resource-preview header { padding-bottom: 18px; border-bottom: 1px solid var(--r2-border, #d8e2ea); }
.resource-preview h1 { margin: 5px 0 14px; }
.resource-preview [data-resource-preview-body] { display: grid; gap: 16px; padding: 20px 0; line-height: 1.65; }
.resource-preview [data-resource-preview-body] h2 { margin: 12px 0 0; }
.resource-preview__callout { padding: 16px 18px; border-left: 5px solid #1769d2; border-radius: 8px; background: #eef6fb; }
.resource-preview__callout[data-tone="security"] { border-left-color: #a53030; background: #fff3f2; }
.resource-preview__callout h2 { margin: 0 0 6px; font-size: 1rem; }
.resource-preview__callout p { margin: 0; }
.resource-preview__checklist { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.resource-preview__checklist li { display: grid; grid-template-columns: 1.4rem 1fr; gap: 7px; }
.resource-preview table { width: 100%; border-collapse: collapse; }
.resource-preview caption { padding-bottom: 8px; text-align: left; font-weight: 800; }
.resource-preview th, .resource-preview td { padding: 9px; border: 1px solid #cbd8e1; text-align: left; vertical-align: top; }
.resource-preview thead th { background: #102f48; color: #fff; }

@media print {
  body:has(.resource-preview-dialog[open]) > :not(.resource-preview-dialog) { display: none !important; }
  .resource-preview-dialog[open] { position: static; display: block; width: auto; max-height: none; padding: 0; box-shadow: none; }
  .resource-preview-dialog .section-heading__actions { display: none; }
  .resource-preview table { break-inside: avoid; }
}

@media (max-width: 900px) {
  .staff-layout,
  .school-history-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .resource-customisation-dialog { width: calc(100% - 16px); max-height: calc(100vh - 16px); padding: 18px; }
  .resource-customisation-fields { grid-template-columns: minmax(0, 1fr); }
  .resource-customisation-dialog .section-heading__actions > * { width: 100%; }
  .resource-preview-dialog { width: calc(100% - 16px); padding: 18px; }
  .resource-preview header .section-heading__actions > * { width: 100%; }
  .resource-preview { overflow-wrap: anywhere; }
  .resource-preview table { display: block; max-width: 100%; overflow-x: auto; }
  .staff-record { grid-template-columns: 1fr; }
  .staff-record__identity { align-items: flex-start; flex-direction: column; }
  .staff-record__actions > * { width: 100%; }
}

/* Guided declaration: a single, keyboard-accessible preparation step at a time. */
.declaration-dialog { width: min(760px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid #c9dce9; border-radius: 22px; color: #102e4f; background: #fff; box-shadow: 0 24px 80px #061f3b55; }
.declaration-dialog::backdrop { background: #071f35b8; backdrop-filter: blur(3px); }
.declaration-dialog__header { display:flex; justify-content:space-between; gap:20px; padding:24px 28px; color:white; background:linear-gradient(115deg,#081e30,#124c78); }
.declaration-dialog__header h2 { margin:4px 0 0; font-size:clamp(1.35rem,3vw,1.8rem); color:white; }
.declaration-dialog__header .r2-eyebrow { color:#a9daf7; }
.declaration-dialog__header button { align-self:flex-start; flex:none; width:44px; height:44px; border:1px solid #ffffff66; border-radius:10px; background:transparent; color:white; font-size:28px; cursor:pointer; }
.declaration-dialog__progress { padding:18px 28px 0; font-size:.9rem; font-weight:700; }
.declaration-dialog progress { width:100%; height:8px; accent-color:#076ae0; }
.declaration-dialog .hub-form { margin:0; border:0; box-shadow:none; background:white; padding:24px 28px; }
.declaration-dialog .hub-form > fieldset { border:0; padding:0; margin:0; min-width:0; }
.declaration-dialog legend { font-size:1.25rem; font-weight:750; margin-bottom:16px; }
.declaration-dialog .hub-form label { display:block; line-height:1.6; padding:14px; border:1px solid #d5e4ef; border-radius:12px; margin:12px 0; background:#f5faff; }
.declaration-dialog .hub-form input[type=checkbox], .declaration-dialog .hub-form input[type=radio] { display:inline-block; width:20px; height:20px; min-height:0; padding:0; margin:0 8px 0 0; vertical-align:middle; accent-color:#0968dc; }
.declaration-dialog .hub-form input[type=time] { width:auto; }
.declaration-dialog__actions { display:flex; justify-content:space-between; gap:12px; margin-top:24px; border-top:1px solid #e1eaf2; padding-top:20px; }
.declaration-dialog [hidden] { display:none!important; }
.declaration-dialog .hub-table-wrap { max-height:220px; overflow:auto; }
@media(max-width:540px) { .declaration-dialog__header,.declaration-dialog .hub-form { padding:20px; } .declaration-dialog__progress { padding:16px 20px 0; } }
.declaration-dialog .hub-form label, .declaration-dialog .hub-form p { font-size:1rem; }
.declaration-dialog .hub-form label { font-weight:600; }

/* Consistent library spacing, scoped to the Resources page. */
[data-page="resources"] .resource-filter { gap: 10px; margin-bottom: 24px; }
.resource-centre { padding: clamp(20px, 3vw, 32px); margin-bottom: 24px; }
.resource-centre > .section-heading { margin-bottom: 20px; }
.resource-centre .section-heading h2 { margin: 8px 0 12px; }
.resource-centre .section-heading p:last-child { margin-bottom: 0; line-height: 1.6; }
.resource-centre [data-managed-resource-groups] > p { margin: 0; line-height: 1.6; }
[data-page="resources"] .resource-grid { gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
[data-page="resources"] .resource-card { padding: 24px; }
[data-page="resources"] .resource-card p { margin-bottom: 24px; }
[data-page="resources"] .resource-card__meta { flex-wrap: wrap; gap: 16px; padding-top: 8px; }
[data-page="resources"] .resource-card__meta small { flex: 1 1 140px; line-height: 1.5; }
[data-page="resources"] .resource-card__meta .r2-button { flex-shrink: 0; }
@media (max-width: 520px) {
  [data-page="resources"] .resource-grid { gap: 18px; }
  [data-page="resources"] .resource-card { padding: 20px; }
  [data-page="resources"] .resource-card__meta { align-items: stretch; flex-direction: column; }
  [data-page="resources"] .resource-card__meta small { flex-basis: auto; }
}

.resource-context-picker { display: grid; gap: 8px; margin: 20px 0; max-width: 480px; }
.resource-context-picker select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #a9bfd1; border-radius: 8px; background: white; font: inherit; color: inherit; }
[data-paper-submissions] { margin-top: 24px; border-top: 1px solid #d8e2ea; }
[data-paper-submissions] form { display: grid; gap: 14px; }
[data-paper-submissions] li { margin: 16px 0; overflow-wrap: anywhere; }

/* Read the published instruction document before acknowledging each step. */
.declaration-document { border:1px solid #c8d9e7; border-radius:14px; overflow:hidden; background:#f2f6fa; margin:18px 0; }
.declaration-document > header { padding:16px 20px; background:#0c2e49; color:#fff; display:grid; gap:5px; }
.declaration-document > header span { font-size:.8rem; color:#c8e7f7; }
.declaration-document__scroll { max-height:48vh; min-height:180px; overflow:auto; overscroll-behavior:contain; padding:clamp(18px,3vw,30px); background:#fff; line-height:1.65; scrollbar-gutter:stable; }
.declaration-document__scroll:focus-visible { outline:3px solid #0968dc; outline-offset:-3px; }
.declaration-document [data-document-body] { display:grid; gap:14px; }
.declaration-document [data-document-body] h2 { font-size:1.18rem; margin:8px 0 0; }
.declaration-document [data-document-body] p { margin:0; }
.declaration-document > progress { display:block; width:100%; height:6px; border-radius:0; }
.declaration-document > p { margin:0; padding:14px 18px; font-size:.86rem; }
.declaration-document > button { margin:0 18px 16px; }
.declaration-document__scroll table { font-size:.85rem; }
.declaration-dialog button:disabled { opacity:.5; cursor:not-allowed; }
@media(max-width:600px) { .declaration-document__scroll { max-height:45vh; } }
