:root {
  --canvas: #faf9f6;
  --surface: #fff;
  --portal-text: #09090b;
  --portal-line: #09090b;
  --ink: #09090b;
  --lime: #e3ff3e;
  --pink: #ff84f4;
  --cyan: #22ffff;
  font-family: Arial, Helvetica, sans-serif;
  scroll-behavior: smooth;
}

:root.dark-mode {
  color-scheme: dark;
  --canvas: #121216;
  --surface: #202027;
  --portal-text: #faf9f6;
  --portal-line: #a7a7af;
}

@font-face {
  font-family: "Fat Frank";
  src: url("Branding/FatFrank-Regular.otf") format("opentype");
  font-display: swap;
}
@font-face {
  font-family: Avenir;
  src: url("Branding/LT_50344.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: #122a43; }
a { color: inherit; }
a:focus-visible { outline: 3px solid #137aa0; outline-offset: 5px; }
.wrap { width: min(1140px, calc(100% - 48px)); margin-inline: auto; }
.portal {
  --gutter: clamp(20px, 5vw, 76px);
  max-width: 1560px;
  margin-inline: auto;
  padding: 0 var(--gutter) 30px;
  color: var(--portal-text);
  font: 500 1rem/1.45 Avenir, Arial, sans-serif;
}
.portal-brand {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(8px, 2vw, 24px);
  min-height: 82px;
  border-bottom: 1px solid var(--portal-line);
}
.portal-brand__college { justify-self: start; }
.portal-brand__college img { display: block; width: clamp(122px, 14vw, 200px); max-width: 100%; }
.portal-brand__campaign { display: block; justify-self: end; width: clamp(106px, 12vw, 168px); max-width: 100%; }
.dark-mode .portal-brand img { filter: invert(1); }
.theme-switch {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  width: clamp(96px, 12vw, 132px);
  padding: 3px;
  border: 1px solid var(--portal-line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--portal-text);
  font: 700 .75rem/1 Avenir, Arial, sans-serif;
  cursor: pointer;
}
.theme-switch span { padding: 10px 0; }
.theme-switch[aria-checked="true"] span:last-child { color: var(--ink); }
.theme-switch::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 3px auto 3px 3px;
  width: calc(50% - 3px);
  border-radius: inherit;
  background: var(--lime);
  transition: transform .2s ease;
}
.theme-switch[aria-checked="true"]::before { transform: translateX(100%); }
.portal-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, .45fr);
  align-items: center;
  gap: clamp(20px, 6vw, 80px);
  padding: clamp(30px, 4vw, 56px) 0 28px;
}
.portal-intro h1 {
  margin: 0;
  font: 400 clamp(3.35rem, 8.7vw, 9rem)/.81 "Fat Frank", "Arial Black", sans-serif;
  letter-spacing: -.035em;
  text-transform: uppercase;
}
.portal-notice {
  position: relative;
  isolation: isolate;
  padding: clamp(18px, 2.5vw, 34px);
  border: 1px solid var(--portal-line);
  background: var(--canvas);
  box-shadow: 6px 6px 0 var(--cyan);
}
.portal-notice h2 { margin: 0 0 7px; font: 400 1.4rem "Fat Frank", "Arial Black", sans-serif; }
.portal-notice p { margin: 0; max-width: 38ch; }
.portal-notice-area .portal-notice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}
.feedback-qr {
  position: relative;
  display: block;
  width: clamp(84px, 8vw, 112px);
  aspect-ratio: 1;
  overflow: hidden;
}
.feedback-qr img {
  position: absolute;
  width: 184%;
  height: auto;
  left: -42%;
  top: -63%;
}
.feedback-button {
  display: block;
  margin-top: 10px;
  padding: 6px 12px;
  border: 1px solid var(--portal-line);
  background: var(--lime);
  color: var(--ink);
  font: 700 .85rem Avenir, Arial, sans-serif;
  cursor: pointer;
}
.feedback-button:hover { background: var(--cyan); }
.portal-quick, .services { display: grid; gap: 10px; }
.portal-quick { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 20px; }
.portal-quick > *, .portal-tile {
  border: 1px solid var(--ink);
  border-radius: 0;
  color: var(--ink);
  font: 700 .92rem/1.2 Avenir, Arial, sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s ease, box-shadow .18s ease;
}
.portal-quick > * {
  display: grid;
  place-items: center;
  min-height: 46px;
  padding: 9px;
  background: var(--lime);
  text-align: center;
}
.portal-quick a { background: var(--pink); }
.portal-quick > :nth-child(2) { background: var(--cyan); }
.portal-quick button[data-portal-menu="pollinks"] { background: #ff9a42; }
.services { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.portal-tile {
  --tile-accent: var(--cyan);
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(6px, 1vw, 12px);
  min-height: 66px;
  padding: 8px 22px 8px 10px;
  background: var(--surface);
  border-color: var(--portal-line);
  color: var(--portal-text);
  text-align: left;
}
.portal-tile:nth-child(3n + 2) { --tile-accent: var(--lime); }
.portal-tile:nth-child(3n) { --tile-accent: var(--pink); }
.portal-tile img, .portal-tile__shop {
  width: 34px;
  height: 34px;
  flex: none;
  object-fit: contain;
}
.portal-tile__shop { display: grid; place-items: center; font-size: 1.35rem; background: var(--lime); }
.portal-tile img[src$="/canvas.png"] { background: #c81153; border-radius: 50%; padding: 3px; }
.portal-tile::after { content: "↗"; position: absolute; top: 5px; right: 7px; font-size: .8rem; }
.portal-tile[data-portal-menu]::after { content: "+"; }
.portal-tile:hover { background: var(--tile-accent); color: var(--ink); }
.portal-quick > *:hover { box-shadow: inset 0 -4px 0 var(--ink); }
.portal :focus-visible, .portal-menu :focus-visible { outline: 2px solid var(--portal-text); outline-offset: 3px; }
.portal-menu {
  width: min(480px, calc(100% - 32px));
  padding: 24px;
  border: 1px solid var(--portal-line);
  background: var(--canvas);
  color: var(--portal-text);
  box-shadow: 6px 6px 0 var(--cyan);
  font: 500 1rem/1.4 Avenir, Arial, sans-serif;
}
.portal-menu::backdrop { background: #000a; }
.portal-menu h2 { margin: 0 0 16px; font: 400 1.6rem "Fat Frank", "Arial Black", sans-serif; }
.portal-menu__links { display: grid; gap: 8px; }
.portal-menu__links > *, .portal-menu button { padding: 9px 12px; border: 1px solid var(--portal-line); background: var(--surface); color: var(--portal-text); }
.portal-menu button { margin-top: 16px; background: var(--lime); color: var(--ink); cursor: pointer; font: inherit; }
.portal-menu__links span { opacity: .7; }
.feedback-dialog { width: min(760px, calc(100% - 32px)); }
.feedback-dialog iframe {
  display: block;
  width: 100%;
  height: min(60dvh, 580px);
  border: 1px solid var(--portal-line);
  background: white;
}
.feedback-dialog form { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.feedback-dialog button { margin: 0; }
.staff-portal .portal-quick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.staff-portal .portal-quick > * {
  display: flex;
  justify-content: center;
  gap: 9px;
  background: var(--cyan);
}
.staff-portal .portal-quick .priority-myconcern {
  background: #ffd0f8;
  color: var(--ink);
  border: 2px solid #a12682;
  box-shadow: 0 0 0 2px rgb(197 65 163 / .26), 0 0 13px rgb(197 65 163 / .52);
}
.staff-portal .portal-quick .priority-myconcern:is(:hover, :focus-within) {
  background: var(--pink);
  box-shadow: 0 0 0 2px rgb(197 65 163 / .35), 0 0 16px rgb(197 65 163 / .65);
}
.staff-portal .portal-quick > [data-portal-menu="payslipsLinks"] { background: var(--lime); }
.staff-portal .portal-quick img { width: 22px; height: 22px; object-fit: contain; }
.guides-drawer {
  position: fixed;
  z-index: 10;
  top: 43%;
  left: 0;
  width: min(270px, calc(100vw - 38px));
  pointer-events: none;
  font: 500 .92rem/1.4 Avenir, Arial, sans-serif;
}
.guides-toggle {
  position: absolute;
  top: 0;
  left: 0;
  width: 34px;
  pointer-events: auto;
  min-height: 88px;
  padding: 11px 8px;
  border: 1px solid var(--ink);
  background: var(--lime);
  color: var(--ink);
  font: 700 .86rem Avenir, Arial, sans-serif;
  writing-mode: vertical-rl;
  cursor: pointer;
}
.guides-toggle:focus-visible { outline: 2px solid var(--portal-text); outline-offset: 2px; }
.guides-panel {
  visibility: hidden;
  transform: translateX(-100%);
  padding: 16px;
  border: 1px solid var(--portal-line);
  background: var(--surface);
  color: var(--portal-text);
  transition: transform .24s ease, visibility .24s;
}
.guides-drawer.is-open .guides-panel {
  visibility: visible;
  pointer-events: auto;
  transform: translateX(34px);
  box-shadow: 4px 4px 0 var(--cyan);
}
.guides-panel h2 { margin: 0 0 8px; font: 400 1.35rem "Fat Frank", "Arial Black", sans-serif; }
.guides-panel ul { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.guides-panel li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-block: 9px;
  border-top: 1px solid var(--portal-line);
}
.guides-panel li span { font-size: .7rem; text-transform: uppercase; }
.calendar-drawer {
  top: 0;
  bottom: 0;
  width: min(800px, calc(100vw - 50px));
}
.calendar-drawer .guides-toggle {
  top: max(8px, calc(43% - 142px));
  min-height: 132px;
  background: var(--cyan);
}
.calendar-drawer .guides-panel {
  position: absolute;
  top: clamp(12px, 6dvh, 54px);
  width: 100%;
  max-height: 88dvh;
  overflow: auto;
}
.calendar-embed {
  display: block;
  width: 100%;
  aspect-ratio: 1 / .707071;
  max-height: 73dvh;
  border: 0;
  border-radius: 8px;
}
.calendar-drawer p { margin: 10px 0 0; font-size: .83rem; }
@media (max-width: 650px), (max-height: 420px) {
  .guides-drawer { top: auto; bottom: 16px; }
  .guides-toggle { top: auto; bottom: 0; }
  .guides-drawer.calendar-drawer { top: 0; bottom: 0; }
  .calendar-drawer .guides-toggle { top: auto; bottom: 114px; }
}
.staff-services {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}
.staff-group {
  min-width: 0;
  border-top: 3px solid var(--portal-line);
}
.staff-group h2 {
  margin: 8px 0;
  font: 400 clamp(1rem, 1.45vw, 1.3rem)/1.1 "Fat Frank", "Arial Black", sans-serif;
}
.staff-group__tiles { display: grid; gap: 5px; }
.staff-group .portal-tile { min-height: 40px; font-size: .86rem; }
.staff-group .portal-tile img { width: 25px; height: 25px; }
.staff-group .portal-tile .portal-tile__wordmark { width: 44px; background: white; }

.academy { position: relative; isolation: isolate; overflow: hidden; background: var(--ink); color: #f5f3ee; }
.academy::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(ellipse at 38% 72%, rgb(227 255 62 / .2), transparent 70%);
  opacity: 0;
  pointer-events: none;
}
.academy:is(:hover, :focus-within)::after { animation: academy-pulse 2s ease-in-out infinite; }

@keyframes academy-pulse {
  0%, 100% { opacity: .3; }
  50% { opacity: 1; }
}
.colour-edge {
  position: relative;
  height: clamp(66px, 9vw, 132px);
  background:
    linear-gradient(to bottom, transparent 10%, var(--ink) 100%),
    linear-gradient(105deg, var(--lime) 5%, var(--lime) 25%, var(--pink) 53%, var(--cyan) 88%);
}
.colour-edge::before {
  content: "";
  position: absolute;
  inset: -1px 0 0;
  background: var(--canvas);
  clip-path: polygon(0 0, 100% 0, 100% 10%, 63% 36%, 55% 26%, 27% 66%, 0 46%);
}
.academy-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  align-items: end;
  gap: clamp(28px, 6vw, 90px);
  padding-block: 22px clamp(52px, 7vw, 96px);
}
.academy h2 {
  margin: 0;
  font: 900 clamp(3.3rem, 8.5vw, 8rem)/.83 "Arial Black", Impact, sans-serif;
  text-transform: uppercase;
  letter-spacing: -.065em;
}
.academy h2 span { display: block; color: var(--lime); }
.academy-copy p { max-width: 33ch; margin: 0 0 22px; font-size: clamp(1.05rem, 2vw, 1.3rem); line-height: 1.5; }
.academy-soon {
  display: inline-block;
  padding: 9px 12px;
  border: 1px solid currentColor;
  color: var(--lime);
  font-size: .82rem;
  font-weight: 900;
  text-transform: uppercase;
}

@media (max-width: 950px) {
  .services { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .staff-services { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }
}

@media (min-width: 951px) {
  main { display: flex; flex-direction: column; min-height: 100svh; }
  .portal { width: 100%; padding-bottom: 18px; }
  .portal-brand { min-height: clamp(56px, 8svh, 82px); }
  .portal-intro { padding-block: clamp(18px, 3svh, 36px); }
  .portal-intro h1 { font-size: min(8.7vw, clamp(3.7rem, 11svh, 8rem)); }
  .portal-quick { margin-bottom: 12px; }
  .portal-quick > * { min-height: 46px; }
  .portal-tile { min-height: clamp(54px, 7.4svh, 74px); padding-block: 6px; }
  .academy { margin-top: auto; }
  .colour-edge { height: clamp(24px, 5svh, 56px); }
  .academy-grid { align-items: center; padding-block: 12px clamp(18px, 3svh, 38px); }
  .academy h2 { font-size: min(8.2vw, clamp(3rem, 9svh, 7rem)); }
  .academy-copy p { margin-bottom: 12px; font-size: 1rem; }
  .staff-portal .portal-intro { gap: clamp(18px, 3vw, 44px); }
  .staff-portal .portal-intro h1 { font-size: min(5.4vw, clamp(2.5rem, 9svh, 6.5rem)); }
  .staff-portal .portal-intro h1 br { display: none; }
  .staff-portal .portal-quick > * { min-height: 40px; }
}

@media (min-width: 951px) and (max-height: 760px) {
  .portal-intro { padding-block: 14px; }
  .colour-edge { height: 30px; }
}

@media (min-width: 951px) and (max-height: 920px) {
  .staff-portal .portal-intro { padding-block: 10px; }
  .staff-portal .portal-notice { padding: 12px 16px; }
  .staff-portal .portal-quick { gap: 6px; }
  .staff-portal .portal-quick > * { min-height: 36px; }
  .staff-group .portal-tile { min-height: 36px; padding-block: 4px; }
  .staff-portal .academy h2 { font-size: min(7vw, 8svh); }
}

@media (min-width: 1100px) and (max-height: 800px) {
  .staff-portal .portal-quick > * { padding: 5px; font-size: .8rem; }
  .staff-portal .portal { padding-bottom: 12px; }
  .staff-portal .academy-grid { padding-top: 6px; }
}

@media (max-width: 650px) {
  .wrap { width: calc(100% - 32px); }
  .portal-brand { min-height: 68px; }
  .portal-intro { grid-template-columns: 1fr; gap: 22px; padding-bottom: 22px; }
  .portal-intro h1 { font-size: clamp(2rem, 11vw, 4.25rem); }
  .portal-quick, .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .staff-portal .portal-quick img { display: none; }
  .portal-tile { font-size: .83rem; padding-left: 7px; padding-right: 15px; }
  .portal-tile img, .portal-tile__shop { width: 26px; height: 26px; }
  .academy-grid { grid-template-columns: 1fr; }
  .staff-services { grid-template-columns: 1fr; }
  .staff-group__tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  .academy:is(:hover, :focus-within)::after { animation: none; opacity: .5; }
  .portal-tile, .portal-quick > * { transition: none; }
  .theme-switch::before { transition: none; }
  .guides-drawer, .guides-panel { transition: none; }
}

.academy h2 span {
  width: fit-content;
  color: transparent;
  -webkit-text-fill-color: transparent;
  background: linear-gradient(90deg, var(--lime), var(--pink), var(--cyan), var(--pink), var(--lime));
  background-size: 200% 100%;
  background-position: 0 0;
  -webkit-background-clip: text;
  background-clip: text;
  animation: academy-sweep 4.5s ease-in-out infinite alternate;
}
@keyframes academy-sweep {
  to { background-position: 100% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .academy h2 span { animation: none; background-position: 50% 0; }
}
.academy-enter {
  background: var(--lime);
  color: var(--ink);
  text-decoration: none;
}
.academy-enter:hover { background: var(--cyan); }
.academy-enter:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }

.customise-home {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin: 0;
  padding: 8px 14px;
  border: 1px solid var(--portal-line);
  background: var(--surface);
  color: var(--portal-text);
  font: 500 .9rem Avenir, Arial, sans-serif;
  text-decoration: none;
}
.customise-home:hover { background: var(--cyan); color: var(--ink); }
.customise-home:focus-visible { outline: 2px solid var(--portal-text); outline-offset: 3px; }

.portal-brand__home { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.customise-home { cursor: pointer; font-size: .8rem; min-height: 34px; padding: 6px 9px; }

@media (max-width: 650px) {
 .portal-brand__home { gap: 6px; }
 .customise-home { font-size: .7rem; }
}

.portal-brand__home { flex-wrap: nowrap; }
.portal-brand__home .portal-brand__college { min-width: 0; }
.customise-home {
  display: inline-flex; flex: none; justify-content: center;
  background: var(--cyan); color: var(--ink);
  border: 2px solid var(--ink); font-size: .85rem;
  font-weight: 700; min-height: 40px;
}
@media (max-width: 800px) {
 .portal-brand__home { flex-direction: column; align-items: flex-start; padding-block: 8px; }
 .customise-home { font-size: .75rem; min-height: 36px; }
}

@media (min-width: 951px) {
 .portal-brand__home { position: relative; }
 .customise-home {
   position: fixed;
   z-index: 9;
   left: 4px;
   top: 10px;
   width: 50px;
   min-height: 64px;
   padding: 7px 4px;
   font-size: .68rem;
   line-height: 1.25;
   overflow-wrap: normal;
 }
}

@media (min-width: 951px) {
 .customise-home {
   width: auto;
   min-height: 38px;
   padding: 8px 12px;
   font-size: .82rem;
   line-height: 1.2;
   white-space: nowrap;
 }
}

.build-home { display: none; }
.is-customising .build-home {
  display: block; position: fixed; z-index: 9; right: 12px; top: 10px;
  padding: 9px 15px; border: 2px solid var(--ink); background: var(--cyan);
  color: var(--ink); font: 700 .85rem Avenir, Arial, sans-serif; cursor: pointer;
}
.is-customising .custom-feature:not(.is-selected),
.is-customising .empty-custom-group { display: none !important; }
#build-menu { max-height: 85dvh; }
#build-options fieldset { margin: 14px 0; padding: 10px; border: 1px solid var(--portal-line); }
#build-options legend { font-weight: 700; padding-inline: 5px; }
#build-options label { display: flex; align-items: center; gap: 10px; padding: 8px 0; cursor: pointer; }
#build-options input { width: 18px; height: 18px; flex: none; accent-color: #168b91; }

#build-menu {
  width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh;
  margin: 0; padding: 0; border: 0; box-shadow: none; overflow: hidden;
}
#build-menu[open] { display: flex; flex-direction: column; }
.builder-header {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 16px 24px; border-bottom: 1px solid var(--portal-line);
}
#build-menu .builder-header h2 { margin: 0; }
#build-menu .builder-header form, #build-menu .builder-header button { margin: 0; }
.builder-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); flex: 1; min-height: 0; }
.builder-options { overflow-y: auto; padding: 20px; border-right: 1px solid var(--portal-line); background: var(--surface); }
.builder-options h3, .builder-preview h3 { margin: 0 0 16px; font: 700 1rem Avenir, Arial, sans-serif; }
.builder-preview { min-width: 0; padding: 24px; overflow: auto; background: #d9dce0; color: #09090b; }
.builder-preview-stage { position: relative; width: 100%; overflow: hidden; box-shadow: 0 4px 24px #0002; background: var(--canvas); }
#homepage-preview { display: block; width: 1280px; height: 800px; border: 0; transform-origin: top left; }
@media (max-width: 700px) {
 .builder-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(220px, 45%) minmax(0, 1fr); }
 .builder-options { border-right: 0; border-bottom: 1px solid var(--portal-line); }
 .builder-preview { padding: 16px; }
 .builder-header { padding: 12px 16px; }
 #build-menu .builder-header h2 { font-size: 1.2rem; }
}

/* Appearance controls apply to the complete homepage. */
.staff-portal[data-button-size="small"] .portal-quick > *,
.staff-portal[data-button-size="small"] .staff-group .portal-tile {
  min-height: 34px; padding: 5px 18px 5px 7px; font-size: .8rem;
}
.staff-portal[data-button-size="large"] .portal-quick > *,
.staff-portal[data-button-size="large"] .staff-group .portal-tile {
  min-height: 58px; padding: 12px 20px 12px 10px; font-size: 1.05rem;
}
.staff-portal[data-button-size="large"] .staff-group .portal-tile img { width: 30px; height: 30px; }
.staff-portal[data-button-colours="plain"] .portal-quick > *,
.staff-portal[data-button-colours="plain"] .portal-quick .priority-myconcern,
.staff-portal[data-button-colours="plain"] .staff-group .portal-tile {
  background: var(--surface); color: var(--portal-text);
  border: 1px solid var(--portal-line); box-shadow: none;
}
.staff-portal[data-button-colours="plain"] .portal-quick > *:hover,
.staff-portal[data-button-colours="plain"] .staff-group .portal-tile:hover {
  background: var(--canvas); box-shadow: inset 0 -2px 0 var(--portal-line);
}

/* IT updates appear below Guides only when unread. */
.it-status-drawer[hidden] { display: none !important; }
.it-status-drawer { top: calc(43% + 100px); }
.it-status-drawer .guides-toggle {
  width: 42px; min-height: 110px;
  background: #ffb76a; border-width: 2px;
  box-shadow: 3px 3px 0 var(--ink);
}
.it-status-message { white-space: pre-wrap; overflow-wrap: anywhere; }
.it-status-read {
  margin-top: 14px; padding: 9px 14px; border: 1px solid var(--ink);
  background: var(--lime); color: var(--ink); font: inherit; cursor: pointer;
}
.it-status-save { margin-bottom: 0; font-size: .8rem; }
.staff-portal .portal-intro { align-items: center; padding-block: 6px 12px; }
.staff-portal .portal-intro .feedback-button { justify-self: end; margin: 0; }
@media (max-width: 650px), (max-height: 420px) {
 .it-status-drawer { top: auto; bottom: 8px; }
 .it-status-drawer .guides-toggle { bottom: 0; }
 .guides-drawer[aria-label="Staff guides"] { bottom: 128px; }
 .calendar-drawer .guides-toggle { bottom: 226px; }
}

/* Restore breathing room around the page title. */
.staff-portal .portal-intro { padding-block: 24px 30px; gap: 28px; }
.staff-portal .portal-intro h1 { line-height: 1; }
.staff-portal .academy h2 { font-size: clamp(2rem, 4vw, 4rem); line-height: 1; }
.staff-portal .academy h2 span { display: inline; }
@media (min-width: 651px) and (min-height: 421px) {
 .it-status-drawer { top: calc(43% + 104px); bottom: auto; }
 .it-status-drawer .guides-toggle { top: 0; bottom: auto; }
}

.it-status-drawer .guides-toggle { background: var(--surface); color: var(--portal-text); box-shadow: none; border: 1px solid var(--portal-line); }
.it-status-drawer.has-update .guides-toggle { background: #ffb76a; color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.it-status-drawer [hidden] { display: none !important; }

/* Edit shortcuts within each column. */
.column-heading { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 10px; }
.staff-group .column-heading h2 { margin: 0; }
.column-edit, .column-restore, .column-hidden-menu button {
  padding: 6px 8px; border: 1px solid var(--portal-line);
  background: var(--surface); color: var(--portal-text);
  font: 500 .8rem Avenir, Arial, sans-serif; cursor: pointer;
}
.column-edit { flex: none; }
.column-edit[aria-pressed="true"] { background: var(--cyan); color: var(--ink); }
.staff-group .portal-tile[hidden], .column-restore[hidden], .column-hidden-menu[hidden] { display: none !important; }
.staff-group.is-editing .portal-tile { border: 2px dashed #a12682; cursor: pointer; padding-right: 27px; }
.staff-group.is-editing .portal-tile::after { content: "−"; color: #a12682; font-size: 1.25rem; top: 50%; transform: translateY(-50%); }
.column-restore { display: block; width: 100%; margin-top: 10px; text-align: left; }
.column-hidden-menu { display: grid; gap: 6px; margin-top: 6px; }
.column-hidden-menu button { text-align: left; }
.column-hidden-menu button:hover { background: var(--cyan); color: var(--ink); }
.column-edit-status:empty { display: none; }
.column-edit-status { color: var(--portal-text); font: 500 .9rem Avenir, Arial, sans-serif; }

/* Global homepage editing */
.staff-group { padding-top: 16px; }
.edit-homepage {
  justify-self: end; display: inline-flex; align-items: center; gap: 9px;
  margin: 0; min-height: 44px; padding: 10px 18px; border: 1px solid var(--portal-line);
  border-radius: 7px; background: var(--surface); color: var(--portal-text);
  box-shadow: 3px 3px 0 var(--cyan); font: 700 .95rem Avenir, Arial, sans-serif; cursor: pointer;
}
.edit-homepage:hover, .edit-homepage[aria-pressed="true"] { background: var(--cyan); color: var(--ink); }
.staff-group .portal-tile.is-muted { opacity: .48; filter: grayscale(1); background: var(--canvas); }
.staff-group .portal-tile.is-muted:not(:focus-visible) { box-shadow: none; }
.editing-homepage .staff-group .portal-tile { outline: 1px dashed var(--portal-line); outline-offset: -4px; cursor: pointer; }
.editing-homepage .staff-group .portal-tile::after { content: "−"; font-size: 1.2rem; }
.editing-homepage .staff-group .portal-tile.is-muted::after { content: "+"; }
.priority-slot { display: grid; gap: 6px; background: transparent !important; border: 0 !important; padding: 0 !important; box-shadow: none !important; }
.priority-slot > :first-child {
  display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 58px;
  padding: 10px; border: 1px solid var(--ink); background: #bde5e5; color: var(--ink);
  font: 700 1.05rem Avenir, Arial, sans-serif; text-decoration: none; cursor: pointer;
}
.priority-slot:nth-child(3) > :first-child { background: #e5edb8; }
.priority-change { display: none; }
.editing-homepage .priority-change { display: block; padding: 7px; background: var(--surface); color: var(--portal-text); border: 1px solid var(--portal-line); font: inherit; cursor: pointer; }
#priority-filter { width: 100%; padding: 10px; margin-block: 8px 14px; border: 1px solid var(--portal-line); background: var(--surface); color: var(--portal-text); font: inherit; }
.priority-picker-list { display: grid; gap: 7px; max-height: 50dvh; overflow-y: auto; }
#priority-picker .priority-picker-list button { margin: 0; text-align: left; background: var(--surface); color: var(--portal-text); }
#priority-picker .priority-picker-list button:hover { background: var(--cyan); color: var(--ink); }
.frequent-dock { position: fixed; z-index: 8; right: 0; top: 44%; font: 500 .9rem Avenir, Arial, sans-serif; color: var(--portal-text); }
.frequent-toggle { writing-mode: vertical-rl; padding: 14px 8px; border: 1px solid var(--portal-line); border-radius: 7px 0 0 7px; background: var(--surface); color: inherit; font: inherit; cursor: pointer; }
#frequent-panel { position: absolute; right: 100%; top: 0; width: min(260px, calc(100vw - 46px)); padding: 16px; border: 1px solid var(--portal-line); border-radius: 8px 0 8px 8px; background: var(--surface); box-shadow: -4px 5px 18px #0002; max-height: 50dvh; overflow: auto; }
#frequent-panel[hidden] { display: none; }
#frequent-panel h2 { margin: 0 0 12px; font-size: 1rem; }
.frequent-list { display: grid; gap: 8px; }
.frequent-list > :is(a,button) { display: flex; align-items: center; gap: 9px; padding: 10px; border: 1px solid var(--portal-line); background: var(--canvas); color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.frequent-list img { width: 24px; height: 24px; object-fit: contain; }
@media (max-width: 650px) { .frequent-dock { top: auto; bottom: 22px; } #frequent-panel { top: auto; bottom: 0; } }

.staff-portal .portal-quick .priority-slot { display: grid; min-width: 0; }
.priority-slot > * { min-width: 0; }

/* Full-size priority buttons and role layouts */
.staff-portal .portal-quick .priority-slot { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; }
.staff-portal .portal-quick .priority-slot > :first-child { width: 100%; min-height: 62px; box-sizing: border-box; flex: 1; font-size: 1.1rem; }
.editing-homepage :is(.guides-drawer,.frequent-dock) { display: none !important; }
.layout-toolbar { display: none; }
.editing-homepage .layout-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 14px 0; padding: 12px; background: var(--surface); border: 1px solid var(--portal-line); color: var(--portal-text); font: 500 .9rem Avenir, Arial, sans-serif; }
.layout-toolbar label { font-weight: 700; }
.layout-toolbar select { padding: 8px; border: 1px solid var(--portal-line); background: var(--canvas); color: var(--portal-text); font: inherit; }
.layout-toolbar span { font-size: .8rem; }
.shortcut-row { display: flex; align-items: stretch; gap: 5px; min-width: 0; }
.shortcut-row .portal-tile { flex: 1; min-width: 0; }
.shortcut-move { display: none; }
.editing-homepage .shortcut-move { display: grid; grid-template-rows: 1fr 1fr; gap: 3px; flex: none; }
.shortcut-move button { width: 26px; padding: 0; border: 1px solid var(--portal-line); background: var(--surface); color: var(--portal-text); font: 700 1rem Arial, sans-serif; cursor: pointer; }
.shortcut-move button:disabled { opacity: .3; cursor: default; }

.staff-right-columns { grid-column: 4 / span 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-content: start; }
.frequent-inline { grid-column: 1 / -1; padding-top: 14px; border-top: 1px solid var(--portal-line); color: var(--portal-text); }
.frequent-inline h2 { margin: 0 0 12px; font: 700 1rem Avenir, Arial, sans-serif; }
.frequent-inline .frequent-list { display: flex; flex-wrap: wrap; gap: 10px; }
.frequent-inline .frequent-list > :is(a,button) {
  display: grid; place-items: center; width: 48px; height: 48px; padding: 8px;
  border: 1px solid var(--portal-line); border-radius: 8px;
  background: var(--surface); color: var(--portal-text); box-shadow: none;
}
.frequent-inline .frequent-list > :is(a,button):hover { background: var(--cyan); color: var(--ink); }
.frequent-inline .frequent-list img { width: 30px; height: 30px; object-fit: contain; }
.frequent-initials { font: 700 .85rem Avenir, Arial, sans-serif; }
.frequent-inline .frequent-list p { margin: 0; font-size: .85rem; }
.editing-homepage .frequent-inline { display: none; }
@media (max-width: 950px) { .staff-right-columns { grid-column: 1 / -1; } }
@media (max-width: 650px) { .staff-right-columns { grid-template-columns: 1fr; } }

.frequent-inline .frequent-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(60px, 1fr)); gap: 10px; }
.frequent-inline .frequent-list > :is(a,button) {
  width: 100%; height: auto; min-height: 82px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  gap: 7px; padding: 9px 4px; border: 0; background: transparent;
}
.frequent-caption { display: block; font: 500 .68rem/1.25 Avenir, Arial, sans-serif; text-align: center; overflow-wrap: anywhere; }
.frequent-inline .frequent-list .frequent-initials {
  display: grid; place-items: center; width: 30px; height: 30px;
  border-radius: 5px; border: 1px solid var(--portal-line); background: var(--surface);
}
.frequent-inline .frequent-list p { grid-column: 1 / -1; }

.shortcut-row[hidden] { display: none !important; }
.shortcut-action-list, .deleted-shortcut-list { display: grid; gap: 10px; }
.portal-menu :is(.shortcut-action-list,.deleted-shortcut-list) button { margin: 0; text-align: left; }
.edit-extra-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.edit-extra-tools button { padding: 8px 12px; border: 1px solid var(--portal-line); background: var(--surface); color: var(--portal-text); font: inherit; cursor: pointer; }
.edit-extra-tools button:last-child { background: var(--cyan); color: var(--ink); }

/* Accessibility options */
.it-status-drawer .guides-toggle,
.it-status-drawer.has-update .guides-toggle { background: var(--pink); color: var(--ink); border-color: var(--ink); }
.accessibility-options { display: none; color: var(--portal-text); font: 500 .95rem Avenir, Arial, sans-serif; margin: 12px 0 20px; padding: 12px 16px; border: 1px solid var(--portal-line); background: var(--surface); }
.editing-homepage .accessibility-options { display: block; }
.accessibility-options summary { cursor: pointer; font-weight: 700; }
.accessibility-controls { display: flex; flex-wrap: wrap; gap: 16px 22px; padding-top: 16px; align-items: end; }
.accessibility-controls label { display: grid; gap: 6px; }
.accessibility-controls select { padding: 9px; border: 1px solid var(--portal-line); background: var(--surface); color: var(--portal-text); font: inherit; }
.accessibility-controls .accessibility-check { display: flex; align-items: center; gap: 8px; padding-bottom: 10px; }
.accessibility-check input { width: 19px; height: 19px; accent-color: #087c83; }
.staff-portal[data-button-size="standard"] .staff-group .portal-tile { min-height: 46px; padding-block: 8px; }
.staff-portal[data-button-size="standard"] .priority-slot > :first-child { min-height: 50px; }
.staff-portal[data-button-size="extra"] .staff-group .portal-tile { min-height: 74px; padding-block: 16px; }
.staff-portal[data-button-size="extra"] .priority-slot > :first-child { min-height: 80px; }
.staff-portal[data-text-size="large"] .staff-group .portal-tile { font-size: 1.17rem; line-height: 1.4; }
.staff-portal[data-text-size="large"] .staff-group h2 { font-size: 1.3rem; line-height: 1.3; }
.staff-portal[data-text-size="large"] .priority-slot > :first-child { font-size: 1.25rem; line-height: 1.4; }
.staff-portal[data-text-size="large"] .frequent-caption { font-size: .85rem; }
.staff-portal[data-appearance="soft"] .priority-slot > :first-child { background: #d5e7e7; }
.staff-portal[data-appearance="soft"] .priority-slot > .priority-myconcern { background: #ecd5e7; border-color: #835473; box-shadow: none; }
.staff-portal[data-appearance="soft"] .priority-slot:nth-child(3) > :first-child { background: #e2e6d2; }
.staff-portal[data-appearance="soft"] .staff-group .portal-tile:hover { background: #d5e7e7; color: #09090b; }
.staff-portal[data-appearance="plain"] .priority-slot > :first-child,
.staff-portal[data-appearance="plain"] .priority-slot > .priority-myconcern,
.staff-portal[data-appearance="plain"] .staff-group .portal-tile { background: var(--surface); color: var(--portal-text); border: 1px solid var(--portal-line); box-shadow: none; }
.staff-portal[data-appearance="plain"] .priority-slot > .priority-myconcern { border-width: 3px; }
:root.strong-contrast { --canvas: #fff; --surface: #fff; --portal-text: #000; --portal-line: #000; }
:root.strong-contrast.dark-mode { --canvas: #000; --surface: #000; --portal-text: #fff; --portal-line: #fff; }
.strong-contrast .staff-group .portal-tile,
.strong-contrast .priority-slot > :first-child,
.strong-contrast .priority-slot > .priority-myconcern { border: 2px solid var(--portal-line); background: var(--surface); color: var(--portal-text); box-shadow: none; }
.strong-contrast .portal-tile.is-muted { opacity: 1; color: var(--portal-text); border-style: dashed; }
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
.staff-portal :is(button,a,input,select,summary):focus-visible { outline: 3px solid var(--portal-text); outline-offset: 3px; }

.accessibility-controls .accessibility-slider { position: relative; min-width: 200px; flex: 1; max-width: 350px; }
.accessibility-slider output { position: absolute; right: 0; top: 0; font-weight: 700; }
.accessibility-slider input { width: 100%; min-height: 28px; accent-color: #087c83; cursor: pointer; }
.accessibility-slider small { opacity: .75; }
.staff-portal[data-button-size="scaled"] .staff-group .portal-tile {
 min-height: var(--staff-tile-height); padding-block: var(--staff-tile-padding);
}
.staff-portal[data-button-size="scaled"] .priority-slot > :first-child { min-height: var(--staff-priority-height); padding-block: var(--staff-tile-padding); }
.staff-portal[data-text-size="scaled"] .staff-group .portal-tile,
.staff-portal[data-text-size="scaled"] .priority-slot > :first-child { font-size: var(--staff-tile-font); line-height: 1.35; }
.staff-portal[data-text-size="scaled"] .staff-group h2 { font-size: var(--staff-heading-font); line-height: 1.3; }

/* Let large text wrap and expand its containers. */
.staff-group, .staff-right-columns, .shortcut-row, .staff-group__tiles, .priority-slot { min-width: 0; }
.staff-portal .portal-tile, .priority-slot > :first-child {
  height: auto; white-space: normal; overflow-wrap: anywhere;
}
.staff-portal .portal-tile > span, .priority-slot > :first-child > span { min-width: 0; overflow-wrap: anywhere; }
.staff-group h2 { overflow-wrap: anywhere; }
.staff-portal .portal-tile img, .priority-slot img { flex-shrink: 0; }
.layout-toolbar > *, .accessibility-controls > * { min-width: 0; max-width: 100%; }
.layout-toolbar select { max-width: 100%; }
@media (min-width: 951px) {
 .staff-portal.large-text-layout .staff-services { grid-template-columns: repeat(3, minmax(0, 1fr)); }
 .staff-portal.large-text-layout .staff-right-columns { grid-column: span 2; }
}
@media (max-width: 650px) {
 .staff-portal.large-text-layout .portal-quick { grid-template-columns: 1fr; }
 .staff-portal.large-text-layout .staff-group__tiles { grid-template-columns: 1fr; }
 .accessibility-controls .accessibility-slider { min-width: min(200px, 100%); }
}

.academy-enter:disabled { opacity: .5; cursor: not-allowed; background: var(--lime); color: var(--ink); }
