/*
  Quality Learning & Teaching Framework - styles for the interactive page.

  Rough order of the file: fonts and colours, the page frame (stage, header,
  footer), the wheel, the home intro, the dimension cards (tabs, exemplars,
  resources), then the responsive tweaks and the password screen.
*/


/* Griffith fonts. These are the Display cuts, loaded from /fonts */
@font-face {
  font-family: "Griffith Sans Display";
  src: url("fonts/GriffithSansDisplay-Regular.otf") format("opentype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Griffith Sans Display";
  src: url("fonts/GriffithSansDisplay-Italic.otf") format("opentype");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Griffith Sans Display";
  src: url("fonts/GriffithSansDisplay-Bold.otf") format("opentype");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Griffith Sans Display";
  src: url("fonts/GriffithSansDisplay-Heavy.otf") format("opentype");
  font-weight: 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Griffith Serif Display";
  src: url("fonts/GriffithSerifDisplay-Bold.otf") format("opentype");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Griffith Serif Display";
  src: url("fonts/GriffithSerifDisplay-Heavy.otf") format("opentype");
  font-weight: 800; font-style: normal; font-display: swap;
}

:root {
  --font-sans: "Griffith Sans Display", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Griffith Serif Display", Georgia, "Times New Roman", serif;

  --ink: #24242c;
  --muted: #565766;
  --paper: #f4f2ee;
  --panel: #ffffff;
  --red: #e51f30;
  --line: #e5e7ec;
  --line-strong: #d6d9e1;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 3px 14px rgba(26, 30, 48, 0.06), 0 1px 4px rgba(26, 30, 48, 0.04);
  /* script.js overrides --accent on each card with that dimension's colour */
  --accent: #e51f30;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* soft blue-grey wash behind the white stage */
  background-color: #d8dde8;
  background-image:
    radial-gradient(58% 48% at 50% -8%, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 70%),
    radial-gradient(52% 55% at 102% 104%, rgba(72, 102, 168, 0.20) 0%, rgba(72, 102, 168, 0) 72%),
    radial-gradient(44% 48% at -4% 36%, rgba(150, 110, 140, 0.12) 0%, rgba(150, 110, 140, 0) 72%),
    linear-gradient(160deg, #e6eaf2 0%, #dbe0ec 46%, #d2d9e7 100%);
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* The white card everything sits on (90% of the window, up to 1680px) */
.stage {
  width: 90%;
  max-width: 1680px;
  margin: 40px auto 60px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  box-shadow:
    0 24px 60px -20px rgba(22, 27, 45, 0.28),
    0 6px 18px -8px rgba(22, 27, 45, 0.1);
}

/* Header: logo and page title */
.site-head {
  padding: 42px 44px 28px;
  border-bottom: 1px solid var(--line);
}
/* the logo links to the Griffith home page */
.site-head .site-logo-link {
  display: block;
  width: fit-content;   /* only the logo itself is clickable */
  margin: 0 0 20px;
  line-height: 0;
}
.site-head .site-logo-link:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 4px;
}
.site-head .site-logo {
  display: block;
  width: auto;
  height: 46px;
  margin: 0;
}
.site-head h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.6vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.06;
  color: #262630;
}
.site-head h1::after {
  content: "";
  display: block;
  width: 66px;
  height: 4px;
  margin-top: 18px;
  border-radius: 2px;
  background: var(--red);
}
.site-head p {
  margin: 12px 0 0;
  color: #7a7a82;
  font-size: 0.95rem;
}

/* Footer: a thin rule and a quiet copyright line */
.site-foot {
  margin-top: 10px;
  padding: 20px 44px 30px;
  border-top: 1px solid var(--line);
}
.site-foot p {
  margin: 0;
  max-width: none;
  font-size: 0.76rem;
  line-height: 1.65;
  color: #a2a2ac;
  text-align: center;
}
.site-foot a {
  color: #90909b;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: #cdcdd5;
}
.site-foot a:hover,
.site-foot a:focus-visible {
  color: var(--red);
  text-decoration-color: currentColor;
}
.site-foot .a11y-statement {
  margin-top: 8px;
  color: #565766;   /* darker than the rest of the footer so it passes AA contrast */
}
.site-foot .a11y-statement a {
  color: #24242c;
  text-decoration-color: currentColor;
}
.site-foot .foot-sep {
  margin: 0 7px;
  color: #cdcdd5;
}

/* Main layout. Home is the diagram on its own; once a dimension is picked it
   splits into two columns. The grid transition is what animates the change. */
.layout {
  padding: 24px 44px 64px;
  display: grid;
  grid-template-columns: 1fr 0fr;   /* home: diagram takes the lot, cards collapsed */
  gap: 0;
  align-items: start;
  transition: grid-template-columns 0.55s cubic-bezier(0.4, 0, 0.2, 1),
              gap 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}
.stage.has-selection .layout {
  grid-template-columns: 1fr 2fr;   /* cards get twice the width of the diagram */
  gap: 48px;
}
/* on the home view, pull the diagram up a bit */
.stage:not(.has-selection) .layout {
  padding-top: 10px;
  padding-bottom: 30px;
}

/* "Navigating the Detailed Dimensions" sits under the diagram */
.home-extra {
  padding: 0 44px 44px;
}
.home-extra .home-section {
  margin-top: 0;
}
/* No open/close animation on first paint (otherwise a link straight to a
   dimension would visibly slide open) */
.stage.no-anim .layout,
.stage.no-anim .diagram-wrap,
.stage.no-anim .content-col {
  transition: none !important;
}

/* The diagram (left column) */
.diagram-col {
  position: static;
}
.stage.has-selection .diagram-col {
  position: sticky;
  top: 24px;
}
.diagram-wrap {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.12));
  transition: max-width 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}
/* soft glow behind the wheel */
.diagram-wrap::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 47%;
  width: 94%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(120, 133, 166, 0.22) 0%,
    rgba(120, 133, 166, 0.11) 44%,
    rgba(120, 133, 166, 0) 72%
  );
  pointer-events: none;
}
.stage.has-selection .diagram-wrap {
  max-width: none;
  margin: 0;
}
/* only shown on the home view */
.stage.has-selection .diagram-wrap::before {
  opacity: 0;
}
.diagram-hint {
  display: none;
  margin: 10px 4px 0;
  text-align: center;
  font-size: 0.72rem;
  font-style: italic;
  line-height: 1.45;
  color: #7a7a82;
}
.diagram-hint strong { color: var(--muted); font-weight: 700; }
.stage.has-selection .diagram-hint { display: block; }

/* Keyboard-only "Back to the wheel" link at the bottom of each dimension card.
   Visually hidden until it gets keyboard focus; screen readers always get it. */
.back-to-wheel {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.back-to-wheel:focus {
  position: static;
  display: inline-block;
  width: auto;
  height: auto;
  margin: 12px 0 0;
  padding: 4px 10px;
  overflow: visible;
  clip-path: none;
  border: 1px solid #b5b8c0;
  border-radius: 4px;
  background: #ececef;
  color: #000;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  outline: 2px solid #000;
  outline-offset: 2px;
}

/* "Select a dimension" instruction above the wheel. A boxed callout so it
   isn't skimmed past. Home view only. */
.wheel-callout {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 760px;
  margin: 0 auto 22px;
  padding: 16px 22px;
  background: #fff5f6;
  border: 2px solid var(--red);
  border-radius: var(--radius);
  box-shadow: 0 6px 18px -8px rgba(229, 31, 48, 0.4);
}
.wheel-callout-icon {
  flex: none;
  width: 40px;
  height: 40px;
  padding: 8px;
  box-sizing: border-box;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
}
.wheel-callout p {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.45;
  color: var(--ink);
}
.wheel-callout p strong { color: #000; font-weight: 600; }
.stage.has-selection .wheel-callout { display: none; }
@media (max-width: 600px) {
  .wheel-callout { padding: 14px 16px; gap: 12px; }
  .wheel-callout p { font-size: 1.02rem; }
}
#diagram {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
  /* lets the enlarged / focus-ringed wedges paint past the edge of the SVG box
     instead of being cut off */
  overflow: visible;
}
#diagram text {
  font-family: var(--font-sans);
}

.section {
  cursor: pointer;
  outline: none;
  transition: transform 0.15s ease, filter 0.15s ease, opacity 0.15s ease;
  transform-origin: 800px 800px;
}
.section:hover,
.section:focus-visible {
  transform: scale(1.035);
  filter: brightness(1.05) drop-shadow(0 12px 22px rgba(14, 18, 34, 0.26));
}
.section.is-active {
  transform: scale(1.03);
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.3));
}
#diagram.has-active .section:not(.is-active) {
  opacity: 0.38;
}
/* a keyboard-focused wedge is never dimmed, so its focus ring stays solid */
#diagram.has-active .section:not(.is-active):focus-visible {
  opacity: 1;
}

/* The coloured outline on each wedge and the centre circle. The inset comes
   from a transform="matrix(...)" baked into each path in the SVG, which keeps
   the stroke crisp and stops hairline gaps showing between pieces. */
#diagram .section > path[stroke],
#diagram .home > path[stroke] {
  stroke-width: 3.5;
}

/* Keyboard focus: the wedge lifts like on hover (rule above) and its outline
   turns into a crisp dark border. */
#diagram .section:focus-visible > path[stroke],
#diagram .home:focus-visible > path[stroke] {
  stroke: #24242c;
  stroke-width: 9;
}

/* Drop shadows for depth: coloured slice, grey label tab, centre disc */
#diagram .section > path:first-of-type {
  filter: drop-shadow(0 11px 16px rgba(14, 18, 34, 0.30));
}
#diagram .section > path:nth-of-type(2) {
  filter: drop-shadow(0 8px 13px rgba(14, 18, 34, 0.22));
}
#diagram .home > circle {
  filter: drop-shadow(0 11px 16px rgba(14, 18, 34, 0.26));
}

/* Centre circle. Hovers like the wedges and takes you back to the home view. */
.home {
  cursor: pointer;
  outline: none;
  transition: transform 0.15s ease, filter 0.15s ease;
  transform-origin: 800px 800px;
}
.home:hover,
.home:focus-visible {
  transform: scale(1.02);
  filter: brightness(1.03);
}

/* One-off entrance: the wheel pieces pop in one after another on a fresh visit */
@keyframes wheelPartIn {
  from { opacity: 0; transform: scale(0.84); }
  to   { opacity: 1; transform: scale(1); }
}
#diagram.is-entering > g {
  animation: wheelPartIn 0.62s cubic-bezier(0.2, 0.75, 0.25, 1) both;
  transform-origin: 800px 800px;
}
#diagram.is-entering > #section-partnership { animation-delay: 0.04s; }
#diagram.is-entering > #section-future { animation-delay: 0.11s; }
#diagram.is-entering > #section-inclusive { animation-delay: 0.18s; }
#diagram.is-entering > #section-assessment { animation-delay: 0.25s; }
#diagram.is-entering > #section-belonging { animation-delay: 0.32s; }
#diagram.is-entering > #section-culturally { animation-delay: 0.39s; }
#diagram.is-entering > #section-purposeful { animation-delay: 0.46s; }
#diagram.is-entering > #section-home { animation-delay: 0.56s; }

/* The dimension cards (right column) */
.content-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 56px;
  /* hidden until a dimension is picked. visibility keeps its links out of the
     keyboard tab order while it's closed (it flips after the fade-out) */
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}
.stage.has-selection .content-col {
  visibility: visible;
  transition: opacity 0.4s ease, visibility 0s;
  opacity: 1;
  max-height: none;
  overflow: visible;
}

/* Intro text and video above the diagram (hidden once a dimension is picked) */
.intro-block {
  padding: 4px 44px 20px;
}
/* Wide screens: intro paragraphs on the left, video on the right */
.intro-top {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 34px;
  align-items: start;
  margin-bottom: 28px;
}
.intro-top .intro-copy .home-intro {
  max-width: none;
  margin-bottom: 16px;
}
.intro-top .intro-copy > :first-child { margin-top: 0; }
.intro-top .intro-copy > :last-child { margin-bottom: 0; }
.intro-top .intro-copy > .home-lead { margin-top: 8px; }
.intro-top .home-video {
  margin-top: 0;
  max-width: none;
}
.video-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--red);
  text-decoration: none;
}
.video-link:hover { text-decoration: underline; }
@media (max-width: 980px) {
  .intro-top {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .intro-top .home-video { margin-top: 8px; max-width: 720px; }
  /* the heading chip overhangs the card on desktop, which would push past
     the screen edge on a phone, so pull it back in */
  .intro-block .home-lead {
    margin-left: 0;
    font-size: 1.1rem;
    padding: 13px 20px 14px;
  }
}

/* grey line and a nudge to use the wheel, between the intro and the diagram */
.intro-rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 34px 0 20px;
}
.intro-cta {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.5;
}

.content-card {
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 34px 38px 38px;
  box-shadow: var(--shadow-card);
  scroll-margin-top: 24px;
  outline: none;
}

/* the card the diagram is currently pointing at (just a subtle cue) */
.dim-card {
  border-left: 3px solid var(--line-strong);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.dim-card.is-current {
  border-color: var(--line-strong);
  border-left-color: var(--accent);
  box-shadow:
    var(--shadow-card),
    0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
}

/* quick pulse when the wheel scrolls you to a card */
@keyframes cardFlash {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent),
                0 10px 34px rgba(0, 0, 0, 0.07);
  }
  12% {
    box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 42%, transparent),
                0 10px 34px rgba(0, 0, 0, 0.07);
  }
  100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent),
                0 10px 34px rgba(0, 0, 0, 0.07);
  }
}
.content-card.is-flash {
  animation: cardFlash 1.2s ease-out;
}

/* Tagline heading: a dark chip that hangs out past the left edge of the stage */
.home-lead {
  width: fit-content;
  max-width: 100%;
  margin: 8px 0 26px -58px;
  padding: 15px 30px 16px;
  background: linear-gradient(150deg, #2d3038 0%, #1b1d23 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  color: #fff;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.005em;
  line-height: 1.22;
  box-shadow:
    0 18px 34px -14px rgba(18, 20, 30, 0.42),
    0 5px 12px -4px rgba(18, 20, 30, 0.18);
}
.home-intro {
  margin: 0 0 14px;
  max-width: 64ch;
  color: #4a4a52;
}
.home-intro strong { color: var(--muted); }
.home-video {
  position: relative;
  margin-top: 22px;
  max-width: 720px;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.home-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  cursor: pointer;
}

/* our own video controls and captions */
.player-big {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s;
}
.player-big:hover { transform: scale(1.06); }
.player-big svg { width: 30px; height: 30px; margin-left: 3px; }
.player-big[hidden] { display: none; }
.player-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 18px 10px 8px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0));
  color: #fff;
}
.player-btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: #fff;
  cursor: pointer;
}
.player-btn:hover,
.player-btn:focus-visible { background: rgba(255, 255, 255, 0.22); }
.player-btn svg { width: 20px; height: 20px; }
.player-cc[aria-pressed="true"] { background: var(--red); }
.player-cc[aria-pressed="true"]:hover { background: var(--red); filter: brightness(1.1); }
.player-time {
  flex: none;
  min-width: 2.2em;
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.player-seek {
  flex: 1;
  min-width: 0;
  height: 4px;
  accent-color: var(--red);
  cursor: pointer;
}
.player-captions {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 52px;
  text-align: center;
  pointer-events: none;
}
.player-captions[hidden] { display: none; }
.player-captions {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.7;
  color: #fff;
}
/* dark grey box behind the words so they read on any picture */
.player-captions span {
  padding: 2px 8px;
  background: rgba(38, 40, 48, 0.88);
  border-radius: 4px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.player:fullscreen { max-width: none; border-radius: 0; border: 0; }
.player:fullscreen .player-captions { font-size: 1.6rem; bottom: 72px; }
.player:-webkit-full-screen { max-width: none; border-radius: 0; border: 0; }
.player:-webkit-full-screen .player-captions { font-size: 1.6rem; bottom: 72px; }

/* "Navigating the Detailed Dimensions" section */
.home-section {
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.home-section > h3 {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--ink);
}
.legend-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 18px;
}
@media (max-width: 1180px) {
  .legend-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 460px) {
  .legend-grid { grid-template-columns: 1fr; }
}
.legend-box {
  position: relative;
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  border-radius: var(--radius-sm);
  padding: 18px 17px 18px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(26, 30, 48, 0.05);
}
.legend-icon {
  display: block;
  width: 30px;
  height: 30px;
  margin: 2px auto 10px;
  color: var(--red);
}
.legend-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}
.legend-box h4 {
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.3;
}
.legend-box h4 span {
  display: block;
  margin-top: 3px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #8b8c98;
}
.legend-box p {
  margin: 0 0 12px;
  font-size: 1rem;
  color: #4a4a52;
  line-height: 1.5;
}
.legend-box p:last-child { margin-bottom: 0; }
.legend-evidence {
  margin-top: 16px;
  background: #f5f6f8;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 22px;
  text-align: center;
}
.legend-evidence-label {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.legend-evidence p {
  margin: 0;
  font-size: 1rem;
  color: #4a4a52;
  line-height: 1.5;
}

/* Card header. The round badge overlaps the top-left corner of the card. */
.dim-card { position: relative; }
.panel-head {
  padding-left: 34px;
  min-height: 34px;
}
.panel-badge {
  position: absolute;
  top: -20px;
  left: -20px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  filter: drop-shadow(0 3px 9px rgba(0, 0, 0, 0.25));
  pointer-events: none;
}
.panel-title {
  margin: 4px 0 0;
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: 0.015em;
  text-transform: uppercase;
  color: var(--ink);
}
.panel-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 4px;
  margin-top: 12px;
  border-radius: 2px;
  background: var(--accent);
}
.panel-intro {
  margin: 14px 0 24px;
  color: #4a4a52;
  font-size: 0.98rem;
}

/* Tabs */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 10px;
  position: relative;
  z-index: 2;
}
.tab {
  appearance: none;
  border: 1px solid var(--line);
  border-bottom: none;
  background: #f3f3f6;
  color: #6b6c78;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.8rem;
  padding: 12px 26px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  cursor: pointer;
  position: relative;
  z-index: 1;
  /* unselected tabs sit on the panel line with a soft shadow, so they look
     like they're tucked behind the selected one */
  margin-bottom: 0;
  box-shadow: 0 -2px 6px rgba(26, 30, 48, 0.08);
  transition: background 0.15s ease, color 0.15s ease;
}
.tab:hover:not([aria-selected="true"]) { background: #eaeaef; color: #4a4a55; }
.tab[aria-selected="true"] {
  /* selected tab: white, joined to the panel, with a thin coloured line on top */
  background: #fff;
  color: var(--accent);
  border-color: var(--line-strong);
  border-top: 3px solid var(--accent);
  padding-top: 10px;
  z-index: 3;
  margin-bottom: -2px;
  box-shadow: none;
}
.tab:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 45%, #ffffff);
  outline-offset: 2px;
}

/* Tab panel (the content under the tabs) */
.tab-panel-wrap {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 26px 30px 30px;
  position: relative;
  z-index: 1;
}
.tab-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 3px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink);
}
.tab-heading-icon {
  flex: 0 0 auto;
  width: 21px;
  height: 21px;
  color: var(--accent);
}
.tab-heading-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}
.tab-panel-wrap .tab-sub {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b8c98;
}
.tab-panel-wrap .tab-sub::after {
  content: "";
  display: block;
  width: 44px;
  height: 2px;
  margin-top: 11px;
  border-radius: 1px;
  background: #bcbfc8;
}
.tab-panel-wrap p {
  margin: 0 0 14px;
  color: #444;
}
.tab-panel-wrap p:last-of-type { margin-bottom: 0; }

/* The bullet list for each tab. Same text size as the exemplar bullets, just
   with more breathing room. */
.char-list,
.tab-panel-wrap .char-empty {
  margin: 15px 0 0;
  padding-left: 20px;
}
.char-list li {
  margin: 0 0 14px;
  color: #4a4a52;
  font-size: 0.9rem;
  line-height: 1.55;
}
.char-list li:last-child { margin-bottom: 0; }
.tab-panel-wrap .char-empty {
  padding-left: 0;
  color: #7a7a82;
  font-style: italic;
}

/* Exemplars (one box per tab) and the Resources box (one per dimension).
   "evi" in the class names is short for evidence, which is what these were
   called originally. */
.evidence-label {
  position: absolute;
  top: -12px;
  left: 20px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
}

/* image boxes: rounded corners and a shadow to match everything else */
.evi-media,
.more-evidence-media {
  display: grid;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-card);
  background: #eef0f4;
}
.evi-media img,
.more-evidence-media img {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* "whole image" mode: show all of a wide picture, with a dark mat top and bottom */
.evi-media--whole {
  background: #1b1b21;
}
.evi-media--whole img {
  object-fit: contain;
}
.evi-media.is-empty,
.more-evidence-empty {
  grid-area: 1 / 1;
  display: grid;
  place-items: center;
  padding: 10px;
  text-align: center;
  color: #9aa0ad;
  font-size: 0.78rem;
  font-style: italic;
}

.evi-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--red);
  text-decoration: none;
}
.evi-link:hover { text-decoration: underline; }

/* The Exemplars box: image on the left, bullets on the right */
.tab-evidence {
  position: relative;
  margin-top: 28px;
  padding: 26px 22px 22px;
  background: #f5f6f8;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
/* When there are two exemplars in the box, a grey line separates them */
.tab-evidence .evi-example + .evi-example {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line-strong);
}
.tab-evidence .evi-intro,
.tab-evidence .evi-outro {
  margin: 0 0 12px;
  color: #4a4a52;
  font-size: 0.9rem;
  line-height: 1.5;
}
.tab-evidence .evi-outro { margin: 16px 0 0; }
.tab-evidence .evi-outro + .evi-outro { margin-top: 10px; }
/* The gap under the last bullet was doubling up: the list's own bottom margin
   plus the closing paragraph's top margin. Drop the list's, and use the same
   10px that sits between the other paragraphs. */
.evi-body > .evi-points:last-child { margin-bottom: 0; }
.tab-evidence .tab-evidence-inner + .evi-outro { margin-top: 10px; }
/* a second list under the image: lead-in line, then bullets at full width */
.tab-evidence .evi-section { margin: 16px 0 0; }
.tab-evidence .evi-section .evi-lead {
  margin: 0 0 10px;
  color: #4a4a52;
  font-size: 0.9rem;
  line-height: 1.5;
}
.tab-evidence .evi-lead strong,
.tab-evidence .evi-intro strong,
.tab-evidence .evi-outro strong { color: var(--ink); }
/* Any line that leads into a bullet list (an intro line or a second list's
   heading) has 16px above it and 10px between it and the first bullet. */
.tab-evidence .evi-intro--lead.evi-intro--prelist { margin: 16px 0 10px; }
.tab-evidence .tab-evidence-inner + .evi-section { margin-top: 16px; }
.tab-evidence .evi-points.evi-points--wide { margin-bottom: 0; }
/* The "Exemplar courtesy of ..." credit: italic, with a coloured bar down the left */
.tab-evidence .evi-courtesy {
  position: relative;
  margin: 18px 0 0;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent, var(--red));
  border-radius: var(--radius-sm);
  color: #4a4a52;
  font-size: 0.86rem;
  font-style: italic;
  line-height: 1.5;
}
/* the opening paragraph runs the full width, above the image and bullets */
.tab-evidence .evi-intro--lead { margin: 6px 0 16px; }
.tab-evidence .evi-intro--lead + .evi-intro--lead { margin-top: -6px; }
.tab-evidence .evi-link--inline {
  display: inline;
  font-size: inherit;
  font-weight: 700;
}
.tab-evidence .evi-outro .evi-note {
  margin-left: 0;
  color: #8b8c98;
  font-size: 0.82rem;
  font-weight: 600;
}
.tab-evidence .evi-heading {
  margin: 0;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.3;
}
.tab-panel-wrap .tab-evidence .evi-subtitle {
  margin: 3px 0 16px;
  color: #4f5060;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.45;
}

/* the image sits top right; heading, subtitle and intro wrap beside it */
.tab-evidence .evi-example { display: flow-root; }
.evi-media-float {
  float: right;
  width: 220px;
  margin: 0 0 14px 22px;
}
/* the opening lines, the bold lead-in and the bullets all wrap around the image;
   anything after the bullets (extra lists, closing text, courtesy) clears it */
.tab-evidence .evi-section,
.tab-evidence .evi-outro,
.tab-evidence .evi-courtesy { clear: both; }
.tab-evidence .evi-media {
  aspect-ratio: 4 / 3;
}
.evi-body {
  min-width: 0;
}
@media (max-width: 620px) {
  .evi-media-float { float: none; width: auto; max-width: 360px; margin: 0 0 14px; }
  /* keep all four tabs on one row on a phone */
  .tabs {
    flex-wrap: nowrap;
    gap: 3px;
    padding: 0 2px;
  }
  .tab {
    flex: 1 1 0;
    min-width: 0;
    padding: 11px 2px;
    font-size: clamp(0.58rem, 2.7vw, 0.74rem);
    letter-spacing: 0;
    line-height: 1.2;
    text-align: center;
    /* on really narrow screens "EXPERIENCE" is allowed to wrap rather than
       get cut off. The tabs still stay on one row. */
    overflow-wrap: anywhere;
  }
  .tab[aria-selected="true"] {
    padding-top: 8px;
  }
}
.evi-points {
  margin: 0 0 16px;
  padding-left: 20px;
}
.evi-points li {
  margin: 0 0 8px;
  color: #4a4a52;
  font-size: 0.9rem;
  line-height: 1.5;
}
.evi-points li:last-child { margin-bottom: 0; }

/* bullets nested under a bullet (used by a few exemplars) */
.evi-subpoints {
  margin: 8px 0 0;
  padding-left: 18px;
  list-style: circle;
}
.evi-subpoints li {
  margin: 0 0 6px;
}

/* Resources box, first version. The block near the bottom of this file
   overrides most of it (outlined box, no photo), so check there first. */
.more-evidence {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 190px;
  gap: 22px;
  align-items: center;
  margin-top: 24px;
  padding: 24px 22px 22px;
  background: #f5f6f8;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.more-evidence-text p {
  margin: 6px 0 12px;
  color: #4a4a52;
  font-size: 0.92rem;
  line-height: 1.5;
}
.more-evidence-text p strong { color: var(--ink); }
.more-evidence-media {
  aspect-ratio: 4 / 3;
}
/* below this width the card column is too narrow for text and image side by
   side, so stack them */
@media (max-width: 1200px) {
  .more-evidence { grid-template-columns: 1fr; }
  .more-evidence-media { max-width: 320px; }
}

/* Floating "Back to top" button. Phones and tablets only (see the media
   queries below), so it's off by default. */
.back-to-top {
  display: none;
}

/* Red "Return Home" button under the diagram (desktop and tablet). It stays
   hidden until a dimension has been picked. */
.home-return-btn {
  display: none;
}
.stage.has-selection .home-return-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px auto 0;
  padding: 12px 22px 12px 16px;
  border: none;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  box-shadow: 0 8px 22px -6px rgba(0, 0, 0, 0.32);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.home-return-btn svg {
  width: 17px;
  height: 17px;
  display: block;
}
.home-return-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px -6px rgba(0, 0, 0, 0.38);
}
.home-return-btn:focus-visible {
  outline: 3px solid #24242c;
  outline-offset: 3px;
}

/* Responsive tweaks */
@media (max-width: 980px) {
  .stage {
    width: 100%;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .site-head,
  .layout,
  .intro-block,
  .home-extra,
  .site-foot { padding-left: 22px; padding-right: 22px; }
  .layout,
  .stage.has-selection .layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .diagram-col,
  .stage.has-selection .diagram-col {
    position: static;
    max-width: none;
    width: 100%;
    margin: 0;
  }
  .diagram-wrap { max-width: none; margin: 0; }
  /* on small screens the cards just appear when a dimension is chosen */
  .content-col {
    display: none;
    opacity: 1;
    max-height: none;
    overflow: visible;
  }
  .stage.has-selection .content-col { display: flex; }
  .intro-block { padding-top: 0; }
  .diagram-col:focus-visible {
    outline: 3px solid var(--red);
    outline-offset: 6px;
    border-radius: 12px;
  }
  .content-card { padding: 26px 22px 30px; }
  .tab-panel-wrap { padding: 22px 20px 26px; }
  .panel-badge {
    width: 52px;
    height: 52px;
    top: -16px;
    left: -14px;
  }
  .panel-head { padding-left: 24px; }

  /* phones get the floating "Back to top" pill instead, so hide the inline
     Return Home button */
  .stage.has-selection .home-return-btn {
    display: none;
  }

  /* the pill is always in the page but only fades in once the diagram has
     scrolled out of view */
  .back-to-top {
    position: fixed;
    right: 16px;
    bottom: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 60;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px 12px 14px;
    border: none;
    border-radius: 999px;
    background: var(--red);
    color: #fff;
    font: inherit;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(14px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .back-to-top.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .back-to-top svg {
    width: 18px;
    height: 18px;
    display: block;
  }
  .back-to-top:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
  }
}

/* Resources box, final version. An outlined box with no fill and no photo,
   with the label pill sitting across its top edge. This is loaded after the
   earlier .more-evidence rules on purpose, so it wins. */
.more-evidence {
  display: block;
  margin-top: 28px;
  padding: 26px 22px 22px;
  background: transparent;
}
.more-evidence-media {
  display: none;
}
.more-evidence .resource-list {
  margin: 6px 0 0;
  padding-left: 20px;
}
.more-evidence .resource-item {
  margin: 0 0 10px;
  color: #4a4a52;
}
.more-evidence .resource-item:last-child { margin-bottom: 0; }
.more-evidence .resource-desc {
  color: #4a4a52;
  font-size: 0.85rem;   /* same as .evi-link, so the line reads evenly */
}
.more-evidence .evi-note {
  margin-left: 8px;
  color: #8b8c98;
  font-size: 0.82rem;
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* Download box at the bottom of the home page: links to the two PDFs */
.download-box {
  margin-top: 20px;
  padding: 16px 18px 18px;
  background: #f5f6f8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
/* bottom of the home page: grey line, then the two downloads side by side */
.download-rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 30px 0 0;
}
.home-section .download-box { margin-top: 26px; padding: 0; background: none; border: 0; border-radius: 0; }
.home-section .download-title { margin-bottom: 18px; font-size: 1.2rem; line-height: 1.55; }
.home-section .download-list { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) {
  .home-section .download-list { grid-template-columns: 1fr; }
}
.download-title {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.3;
}
.download-list {
  display: grid;
  gap: 10px;
}
.download-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px rgba(26, 30, 48, 0.05);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.download-link:hover,
.download-link:focus-visible {
  border-color: var(--red);
  box-shadow: 0 4px 14px rgba(26, 30, 48, 0.12);
  transform: translateY(-1px);
}
.download-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #fdecee;
  color: var(--red);
}
.download-icon:has(svg rect[fill="#185abd"]) { background: #e6eefb; }
.download-icon svg { width: 24px; height: 24px; display: block; }
.download-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.download-name {
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.3;
  color: var(--ink);
}
.download-meta {
  font-size: 0.8rem;
  font-weight: 600;
  color: #8b8c98;
}
.download-arrow {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--red);
}
.download-arrow svg { width: 100%; height: 100%; display: block; }

/* the same box again under the diagram once a dimension is picked */
.diagram-downloads { display: none; }
.stage.has-selection .diagram-downloads { display: block; }
.diagram-downloads .download-box { margin-top: 14px; padding: 12px 14px 14px; }
.diagram-downloads .download-title { margin-bottom: 10px; font-size: 0.95rem; }
.diagram-downloads .download-list { gap: 8px; }
.diagram-downloads .download-link { padding: 9px 12px; gap: 12px; }
.diagram-downloads .download-icon { width: 34px; height: 34px; }
.diagram-downloads .download-icon svg { width: 20px; height: 20px; }
.diagram-downloads .download-name { font-size: 0.86rem; }
.diagram-downloads .download-meta { font-size: 0.74rem; }
/* one-column layout: keep it under the wheel, centred and not stretched */
@media (max-width: 980px) {
  .diagram-downloads .download-box { max-width: 420px; margin-left: auto; margin-right: auto; }
}
/* if the window is too short for the wheel plus the box, let the column scroll */
@media (min-width: 981px) {
  .stage.has-selection .diagram-col {
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    scrollbar-width: thin;
  }
}
/* bold labels at the start of a bullet */
.tab-evidence .evi-points strong { color: var(--ink); }

/* Keyboard tip at the top of the tab content (Design / Align / Teach / Experience). Visually
   hidden (but still read out by screen readers) until a tab has keyboard focus. */
.tab-tip {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.dim-card:has(.tab:focus-visible) .tab-tip {
  position: static;
  width: auto;
  height: auto;
  margin: 0 0 16px;
  overflow: visible;
  clip-path: none;
  white-space: normal;
  font-size: 0.85rem;
  line-height: 1.4;
  color: #4a4a52;
}
