/* VRPLAY project website
   One stylesheet for every page. Edit the values under :root to retheme.
   The site must stay static and self-contained: no external fonts or scripts. */

:root {
  --paper: #ffffff;
  --ink: #1b1540;
  --muted: #5f5a78;
  --accent: #6a4cdb;
  --accent-deep: #4a32b0;
  --tint: #f3f0fb;
  --line: #e4e1ef;
  --faint: #d9d6e6;

  --measure: 64ch;
  --wide: 72rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

/* ---- base ---------------------------------------------------------- */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-figure img { animation: none; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

h1, h2, h3 {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); max-width: 22ch; }
h2 { font-size: clamp(2rem, 4.4vw, 3.25rem); margin-top: 0; max-width: 18ch; }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; }

h1 em, h2 em {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.045em;
  color: var(--accent);
}

p, ul, ol, table { max-width: var(--measure); }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.25em; margin: 0 0 1em; }
li { margin-bottom: 0.35em; }

a { color: var(--accent-deep); }
a:hover { color: var(--accent); }
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

img { max-width: 100%; height: auto; display: block; }

.muted { color: var(--muted); }

.vh {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---- layout -------------------------------------------------------- */

.wrap {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

main > section {
  position: relative;
  overflow: hidden;
  padding: clamp(4rem, 8vw, 7rem) 0;
  border-top: 1px solid var(--line);
}

main > section:first-child { border-top: 0; }

.lede {
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--muted);
  max-width: 54ch;
}

.section-kicker {
  margin: 0 0 0.75rem;
  color: var(--accent-deep);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
}

/* Alternating washes make the long page feel like a sequence of chapters. */
main > section:nth-of-type(2) { background: #f3f0fb; }
main > section:nth-of-type(3) { background: #dfeaff; }
main > section:nth-of-type(4) { background: #e5efff; }
main > section:nth-of-type(5) { background: #ebe5ff; }
main > section:nth-of-type(6) { background: #f1edff; }

main > section:not(.hero)::before {
  content: "";
  position: absolute;
  width: 18rem;
  height: 18rem;
  right: -8rem;
  top: -9rem;
  border-radius: 50%;
  background: rgba(106, 76, 219, 0.08);
  pointer-events: none;
}

main > section:nth-of-type(4)::before {
  background: rgba(126, 190, 255, 0.24);
}

/* ---- header and navigation ---------------------------------------- */

.site-header {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-decoration: none;
  color: var(--accent-deep);
  margin-right: auto;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  max-width: none;
}

.site-nav li { margin: 0; }

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* ---- home hero -----------------------------------------------------
   The one loud moment on the site. Full-bleed violet band, the VRPLAY
   wordmark at full size, the character from the poster, and two routes
   into the rest of the site. Everything after it goes back to white.  */

.hero {
  position: relative;
  overflow: hidden;
  padding: 0;
  border-top: 0;
  color: #ffffff;
  background-color: #4a2fc4;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255, 111, 214, 0.55), rgba(255, 111, 214, 0) 42%),
    radial-gradient(circle at 88% 88%, rgba(126, 241, 255, 0.45), rgba(126, 241, 255, 0) 40%),
    radial-gradient(circle at 70% 10%, rgba(240, 246, 150, 0.35), rgba(240, 246, 150, 0) 32%),
    linear-gradient(135deg, #3517a8 0%, #5a37e0 55%, #8b4ff0 100%);
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: end;
  gap: 2rem 3rem;
}

.hero-copy { padding: 4.5rem 0 4rem; }

.hero .logo {
  width: min(42rem, 100%);
  margin-bottom: 2.25rem;
  filter: drop-shadow(0 18px 30px rgba(20, 8, 70, 0.45));
}

.hero h1 {
  color: #ffffff;
  margin-bottom: 1rem;
  text-shadow: 0 2px 18px rgba(20, 8, 70, 0.35);
}

.hero .lede {
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 2rem;
}

.hero-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  max-width: none;
}

.hero-links li { margin: 0; }

.hero-links a {
  display: inline-block;
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  color: var(--ink);
  background: #d9d0ff;
  border: 2px solid #d9d0ff;
}

.hero-links a:hover { background: #e8e2ff; border-color: #e8e2ff; color: var(--ink); }

.hero-links .ghost {
  color: #ffffff;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.7);
}

.hero-links .ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: #ffffff; color: #ffffff; }

.hero-links a:focus-visible { outline-color: #ffffff; }

.hero-figure {
  margin: 0;
  align-self: end;
  justify-self: end;
  max-width: 24rem;
  width: 100%;
  padding-top: 2rem;
}

.hero-figure img {
  width: 100%;
  margin-bottom: -2.5rem;
  filter: drop-shadow(0 24px 40px rgba(20, 8, 70, 0.5));
  transform-origin: 50% 100%;
  animation: hero-character-float 5.5s ease-in-out infinite;
  will-change: transform;
}

@keyframes hero-character-float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  25% { transform: translate3d(0.15rem, -0.35rem, 0) rotate(0.5deg); }
  50% { transform: translate3d(0, -0.7rem, 0) rotate(0deg); }
  75% { transform: translate3d(-0.15rem, -0.35rem, 0) rotate(-0.5deg); }
}

@media (max-width: 52rem) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-copy { padding: 3rem 0 2rem; }
  .hero-figure { max-width: 16rem; justify-self: center; padding-top: 0; }
  .hero-figure img { margin-bottom: -1.5rem; }
  .page-title h1 { max-width: none; }
}

/* ---- page title block (VE pages) ---------------------------------- */

.page-title {
  position: relative;
  min-height: clamp(36rem, 72vh, 50rem);
  padding: 0;
  overflow: hidden;
  border-top: 0;
  background: #1b1540;
}

.page-title .wrap {
  position: relative;
  display: block;
  min-height: clamp(36rem, 72vh, 50rem);
  max-width: none;
  padding-top: clamp(3rem, 8vw, 7rem);
  padding-bottom: clamp(3rem, 8vw, 7rem);
  background: transparent;
}

.page-title .wrap::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 0; right: 0; bottom: 0; left: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(17, 13, 45, 0.7) 0%, rgba(27, 21, 64, 0.5) 25%, rgba(59, 40, 139, 0.18) 48%, rgba(59, 40, 139, 0.02) 72%, rgba(59, 40, 139, 0) 88%),
    linear-gradient(180deg, rgba(27, 21, 64, 0.15), rgba(27, 21, 64, 0.08));
}

.page-title .section-kicker { color: var(--page-accent, #b9a7ff); }

.page-title-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: clamp(30rem, 58vh, 42rem);
  max-width: 39rem;
  padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1.5rem, 4vw, 3.5rem);
  border-left: 1px solid rgba(255, 255, 255, 0.72);
  color: #ffffff;
  text-shadow: 0 0.15rem 1.2rem rgba(8, 5, 28, 0.42);
}

.page-title-copy .section-kicker { color: var(--page-accent, #b9a7ff); }
.page-title-copy .byline,
.page-title-copy .lede { color: rgba(255, 255, 255, 0.9); }
.page-title-copy .byline {
  display: inline-flex;
  align-self: flex-start;
  width: fit-content;
  padding: 0.35rem 0.75rem;
  color: #ffffff;
  background: rgba(8, 5, 28, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  box-shadow: 0 0.35rem 1rem rgba(8, 5, 28, 0.28);
  text-shadow: none;
}
.page-title-copy h1 { color: #ffffff; }

.page-title h1 {
  font-size: clamp(3rem, 6vw, 5.25rem);
  max-width: 8ch;
}

.page-title h1 em {
  color: #c7a8ff;
}

.page-title .byline {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
}

/* Keep the credit readable over every environment image. This comes after
   the general byline rule so it cannot be overridden by the page title styles. */
.page-title .page-title-copy .byline {
  color: var(--ink);
  background: #ffffff;
  border-color: #ffffff;
  box-shadow: 0 0.35rem 1rem rgba(8, 5, 28, 0.35);
}

.page-title .cover {
  position: absolute;
  z-index: 0;
  top: 0; right: 0; bottom: 0; left: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: #1b1540;
  box-shadow: none;
}

.page-title .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  image-rendering: auto;
  filter: brightness(1.12) saturate(1.12) contrast(1.05);
}

/* Resources and Contact use an editorial intro rather than an image hero.
   Keep them independent from the full-bleed environment-page treatment. */

.support-page .page-title {
  min-height: auto;
  padding: clamp(4rem, 8vw, 7rem) 0;
  background: linear-gradient(135deg, #f0ecff 0%, #e6f5fb 100%);
}

.support-page .page-title .wrap {
  min-height: auto;
  max-width: var(--wide);
  padding-top: 0;
  padding-bottom: 0;
}

.support-page .page-title .wrap::after {
  display: none;
}

.support-page .page-title h1,
.support-page .page-title .lede {
  position: relative;
  z-index: 2;
}

.support-page .page-title h1 {
  color: var(--ink);
  max-width: 12ch;
}

.support-page .page-title .lede {
  color: var(--muted);
}

.support-page main > section:nth-of-type(2) { background: #f4f1ff; }
.support-page main > section:nth-of-type(3) { background: #e8f6fb; }
.support-page main > section:nth-of-type(4) { background: #f2efff; }

.support-page main > section:not(.page-title) h2 {
  color: var(--accent-deep);
}

/* ---- environment pages -------------------------------------------
   These sections echo the homepage's chapter rhythm, but use a quieter
   editorial layout so each environment feels like its own case study. */

.environment-page {
  --page-accent: #b9a7ff;
  --page-wash: #f0ecff;
  --page-wash-strong: #e2edff;
  --page-wash-soft: #f5f2ff;
  --page-wash-strong-soft: #ecf3ff;
  --page-wash-faint: #f7f5ff;
  --page-wash-strong-faint: #f0f6ff;
  --page-deep: #4b328e;
}

.environment-page--apple {
  --page-accent: #b9a7ff;
  --page-wash: #f0ecff;
  --page-wash-strong: #e2edff;
  --page-wash-soft: #f5f2ff;
  --page-wash-strong-soft: #ecf3ff;
  --page-wash-faint: #f7f5ff;
  --page-wash-strong-faint: #f0f6ff;
  --page-deep: #4b328e;
}

.environment-page--water {
  --page-accent: #b9a7ff;
  --page-wash: #f0ecff;
  --page-wash-strong: #e2edff;
  --page-wash-soft: #f5f2ff;
  --page-wash-strong-soft: #ecf3ff;
  --page-wash-faint: #f7f5ff;
  --page-wash-strong-faint: #f0f6ff;
  --page-deep: #4b328e;
}

.environment-page--bunny {
  --page-accent: #b9a7ff;
  --page-wash: #f2ecff;
  --page-wash-strong: #e9f3ff;
  --page-wash-soft: #f6f2ff;
  --page-wash-strong-soft: #f0f7ff;
  --page-wash-faint: #f8f5ff;
  --page-wash-strong-faint: #f4f9ff;
  --page-deep: #4b328e;
}

.environment-page main > section:nth-of-type(2) { background: var(--page-wash); }
.environment-page main > section:nth-of-type(3) { background: var(--page-wash-strong); }
.environment-page main > section:nth-of-type(4) { background: var(--page-wash-soft); }
.environment-page main > section:nth-of-type(5) { background: var(--page-wash-strong-soft); }
.environment-page main > section:nth-of-type(6) { background: var(--page-wash-faint); }

.environment-page main > section:not(.page-title)::before {
  width: 24rem;
  height: 24rem;
  right: -12rem;
  top: -12rem;
  background: rgba(185, 167, 255, 0.2);
}

.environment-page main > section:not(.page-title)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(34vw, 25rem);
  height: 0.35rem;
  background: linear-gradient(90deg, var(--page-accent) 0%, transparent 100%);
  pointer-events: none;
}

.environment-page main > section:not(.page-title) .wrap {
  position: relative;
  z-index: 1;
}

.environment-page main > section:not(.page-title) h2 {
  color: var(--page-deep);
  max-width: 12ch;
}

.environment-page main > section:not(.page-title) h2::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 0.25rem;
  margin-top: 1.2rem;
  border-radius: 999px;
  background: var(--page-accent);
}

.environment-page main > section:not(.page-title) h3 {
  color: var(--page-deep);
}

.environment-page #overview .wrap,
.environment-page #results .wrap,
.environment-page #documents .wrap {
  display: grid;
  grid-template-columns: minmax(12rem, 0.72fr) minmax(0, 1.45fr);
  gap: 1rem clamp(2rem, 7vw, 7rem);
  align-items: start;
}

.environment-page #overview h2,
.environment-page #results h2,
.environment-page #documents h2 {
  position: sticky;
  top: 1.5rem;
}

.environment-page #results h2 {
  grid-row: 1 / span 4;
}

.environment-page #overview .wrap > :not(h2),
.environment-page #results .wrap > :not(h2),
.environment-page #documents .wrap > :not(h2) {
  grid-column: 2;
}

.environment-page #design .wrap {
  display: block;
}

.environment-page #design {
  overflow: visible;
}

.environment-page #design h2 {
  max-width: 14ch;
  margin-bottom: 1.5rem;
}
.environment-page #design h3 {
  margin: 2.5rem 0 0.75rem;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
}
.environment-page #design .gallery { margin-top: 0; }
.environment-page .todo {
  border-color: #a18cf4;
  background: rgba(255, 255, 255, 0.52);
}

.environment-page #results .tally {
  margin-top: 0;
  padding: 1rem;
  border: 1px solid #ccc1f8;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.54);
}

.environment-page #results .wrap {
  row-gap: 0;
}

.environment-page #results .verdict {
  margin-bottom: 0.35rem;
}

.environment-page #results .tally-note {
  margin-top: 0.45rem;
}

/* Findings added to the Bunny Rally results panel. Keep these elements
   within the existing white-panel visual language instead of falling back
   to browser defaults. */
.results-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.results-highlights article {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
  border: 1px solid #d8cdfa;
  border-radius: 0.8rem;
  background: #faf9ff;
}

.results-highlights span,
.results-highlights small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.results-highlights strong {
  color: var(--page-deep);
  font-size: 1.25rem;
}

.results-note {
  font-size: 0.88rem;
}

.environment-page #results .tally li.met,
.environment-page #results .tally li.part {
  border-color: var(--page-deep);
}

.environment-page .gallery {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.2fr) minmax(0, 0.88fr);
  gap: clamp(0.85rem, 2vw, 1.5rem);
  align-items: center;
}

.environment-page .gallery figure {
  min-width: 0;
  margin: 0;
  position: relative;
  z-index: 0;
  transition: transform 220ms ease, z-index 220ms ease;
}

.environment-page .gallery figure:hover,
.environment-page .gallery figure:focus-within {
  z-index: 10;
  transform: translateY(-0.45rem) scale(1.7);
}

.environment-page .gallery img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border: 1px solid rgba(106, 76, 219, 0.4);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 0.8rem 1.5rem rgba(53, 35, 126, 0.1);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.environment-page .gallery figure:hover img,
.environment-page .gallery figure:focus-within img {
  box-shadow: 0 1.2rem 2.2rem rgba(53, 35, 126, 0.22);
}

.environment-page .gallery-featured img {
  border-color: rgba(157, 234, 255, 0.9);
  box-shadow: 0 1rem 2rem rgba(53, 35, 126, 0.17);
}

.environment-page .gallery figcaption {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.environment-page .gallery-number {
  flex: none;
  color: var(--page-deep);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.environment-page .gallery-number::after {
  content: "";
  display: inline-block;
  width: 1.5rem;
  height: 1px;
  margin: 0 0.35rem 0.25rem;
  background: var(--page-accent);
}

@media (max-width: 42rem) {
  .page-title-copy {
    min-height: 26rem;
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .environment-page #overview .wrap,
  .environment-page #design .wrap,
  .environment-page #results .wrap,
  .environment-page #documents .wrap {
    display: block;
  }

  .environment-page main > section:not(.page-title) h2 {
    position: static;
    margin-bottom: 1.5rem;
  }

  .environment-page #design h3 { margin-top: 2rem; }
  .environment-page #design .gallery { margin-top: 0.75rem; }
  .environment-page .gallery { grid-template-columns: 1fr; }
  .environment-page .gallery-featured { order: -1; }
  .results-highlights { grid-template-columns: 1fr; }
  .environment-page .gallery figure:hover,
  .environment-page .gallery figure:focus-within {
    transform: translateY(-0.35rem) scale(1.35);
  }
}

/* ---- environment list (home) -------------------------------------- */

.environments {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: none;
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
}

.environments > li {
  position: relative;
  margin: 0;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(160deg, #24145f 0%, #171039 100%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 1.25rem;
  box-shadow: 0 1.25rem 2rem rgba(39, 24, 107, 0.2);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.environments .card-number {
  position: absolute;
  z-index: 1;
  top: 0.8rem;
  left: 1rem;
  color: #b9a7ff;
  font-size: clamp(2.75rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.08em;
  line-height: 1;
  text-shadow: 0 0.15rem 1rem rgba(27, 21, 64, 0.35);
}

.environments > li:nth-child(1) { transform: rotate(-1deg); }
.environments > li:nth-child(2) { transform: translateY(0.8rem); }
.environments > li:nth-child(3) { transform: rotate(1deg); }
.environments > li:hover,
.environments > li:focus-within {
  transform: translateY(-0.35rem) rotate(0deg);
  box-shadow: 0 1.5rem 2.5rem rgba(39, 24, 107, 0.28);
}

.environments .thumb {
  width: 100%;
  height: 14rem;
  object-fit: cover;
  background: var(--tint);
  margin-bottom: 0;
}

.environments h3,
.environments .owner,
.environments li > p,
.environments .tally {
  position: relative;
  z-index: 1;
  margin-left: 1.25rem;
  margin-right: 1.25rem;
}

.environments h3 { margin-top: 1.1rem; margin-bottom: 0.15rem; }
.environments h3 a { color: #ffffff; }
.environments h3 a:hover { color: #b9a7ff; }
.environments .owner { color: rgba(255, 255, 255, 0.7); margin-bottom: 0.75rem; }
.environments li > p { margin-bottom: 1rem; }

/* ---- the seven-part PLAY tally ------------------------------------
   Each list item is one measured component of PLAY.
   State classes: .met  .part  .none                                     */

.tally {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  align-content: flex-start;
  max-width: none;
}

.environments .tally {
  margin-bottom: 1.25rem;
}

.tally li {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.7rem 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.875rem;
  line-height: 1.2;
  min-height: 2rem;
  white-space: nowrap;
  border: 1px solid var(--faint);
  color: var(--muted);
}

.environments .tally li {
  position: relative;
  z-index: 0;
  flex: 0 0 auto;
  color: var(--ink);
  border-color: var(--faint);
  background: rgba(255, 255, 255, 0.94);
}

.environments .tally .met,
.environments .tally .part {
  color: var(--ink);
  border-color: var(--accent);
  background: var(--tint);
}

.environments .tally .met::before,
.environments .tally .part::before {
  border-color: var(--accent);
}

.environments .tally .met::before { background: var(--accent); }
.environments .tally .part::before {
  background: linear-gradient(90deg, var(--accent) 50%, transparent 50%);
}

.tally li::before {
  content: "";
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  border: 2px solid var(--faint);
  background: transparent;
  flex: none;
}

.tally .met {
  color: var(--ink);
  border-color: var(--accent);
  background: var(--tint);
}
.tally .met::before { background: var(--accent); border-color: var(--accent); }

.tally .part { color: var(--ink); border-color: var(--accent); }
.tally .part::before {
  border-color: var(--accent);
  background: linear-gradient(90deg, var(--accent) 50%, transparent 50%);
}

.tally .none { color: var(--muted); }

.tally-note {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0;
}

.verdict {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* ---- tables -------------------------------------------------------- */

table {
  border-collapse: collapse;
  width: 100%;
  max-width: 48rem;
  font-size: 0.95rem;
  margin: 0 0 1.5rem;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 1rem 0.6rem 0;
  border-bottom: 1px solid var(--line);
}

th { font-weight: 600; color: var(--ink); }
thead th { border-bottom: 2px solid var(--ink); }
td:last-child, th:last-child { padding-right: 0; }

.table-scroll { overflow-x: auto; }

.results-table table {
  max-width: none;
  margin-bottom: 0;
}

.results-table th:nth-child(2),
.results-table td:nth-child(2) {
  width: 6rem;
  white-space: nowrap;
}

.results-table th:last-child,
.results-table td:last-child {
  width: 10rem;
  white-space: nowrap;
}

.results-table td:last-child {
  color: var(--page-deep);
  font-weight: 600;
}

/* ---- figures and placeholders ------------------------------------- */

figure { margin: 0 0 2rem; }
figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.5rem; }

.gallery {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.gallery figure { margin: 0; }
.gallery img {
  width: 100%;
  height: 12rem;
  object-fit: cover;
  border-radius: 6px;
  background: var(--tint);
}

/* Anything carrying .todo is placeholder content that still has to be
   written or supplied. Remove the class once the real content is in. */
.todo {
  border: 1.5px dashed var(--accent);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  color: var(--accent-deep);
  background: var(--tint);
}

p.todo, li.todo { max-width: var(--measure); }
td .todo { display: inline-block; padding: 0.1rem 0.5rem; font-size: 0.85rem; }

/* ---- team ----------------------------------------------------------- */

.team {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: none;
  display: grid;
  gap: 1.5rem 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.team li { margin: 0; }
.team .name { font-weight: 600; margin: 0; }
.team .role { color: var(--muted); margin: 0 0 0.25rem; }
.team p { margin: 0; }

/* ---- footer -------------------------------------------------------- */

.site-footer {
  margin-top: 2rem;
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
}

.site-footer p { margin: 0 0 0.35rem; }
.site-footer a { color: inherit; }

/* ---- responsive ---------------------------------------------------- */

@media (max-width: 40rem) {
  body { font-size: 1rem; }
  main > section { padding: 2.5rem 0; }
  th, td { padding-right: 0.75rem; }
}

@media print {
  .site-nav { display: none; }
  a { color: inherit; text-decoration: none; }
}


/* ---- additions for the Method page and the filled-in environment pages ----
   Appended after the environment-page rules on purpose so they take
   precedence where the selectors overlap.                               */

table.wide { max-width: var(--wide); }
table.wide td:nth-child(4) { white-space: nowrap; }

figure.narrow { max-width: 32rem; }
figure.narrow img {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

/* Two framework diagrams side by side on wide screens */
.framework-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 2rem;
  margin: 1.5rem 0 2.5rem;
}
.framework-pair figure { max-width: none; }

/* Result charts: keep the gallery hover-to-enlarge behaviour but never crop
   a chart, and let the grid flow to as many rows as needed. */
.environment-page .gallery.charts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  margin: 2rem 0;
}
.environment-page .gallery.charts img {
  object-fit: contain;
  background: #ffffff;
}
.environment-page .gallery.charts figure:hover,
.environment-page .gallery.charts figure:focus-within {
  transform: translateY(-0.45rem) scale(1.45);
}

/* The filled-in environment page has seven sections; give the last two a wash. */
.environment-page main > section:nth-of-type(7) { background: var(--page-wash-strong-faint); }

/* Sections added to environment pages that should read full width, not in the
   two-column case-study grid. */
.environment-page #framework .wrap,
.environment-page #method .wrap { display: block; }
.environment-page #framework h2,
.environment-page #method h2 { max-width: 14ch; margin-bottom: 1.5rem; }
.environment-page #framework h3 { margin: 2rem 0 0.75rem; }

/* Method page: a fifth and sixth wash so the long page keeps its rhythm. */
.support-page--method main > section:nth-of-type(5) { background: #e8f6fb; }
.support-page--method main > section:nth-of-type(6) { background: #f4f1ff; }
.support-page--method main > section:nth-of-type(7) { background: #e8f6fb; }
.support-page--method .page-title h1 { max-width: 14ch; }

@media (max-width: 42rem) {
  .environment-page .gallery.charts { grid-template-columns: 1fr; }
  .environment-page .gallery.charts figure:hover,
  .environment-page .gallery.charts figure:focus-within { transform: none; }
}


/* ---- white text panels ---------------------------------------------
   The team's preference: body text on the environment and method pages
   sits in solid white blocks on the coloured section washes. Each
   section's content after its heading is wrapped in .panel.            */

.panel {
  background: #ffffff;
  border-radius: 10px;
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: 0 1px 2px rgba(27, 21, 64, 0.06);
}

.panel > :first-child { margin-top: 0; }
.panel > :last-child { margin-bottom: 0; }
.panel p:last-child, .panel ul:last-child, .panel .table-scroll:last-child { margin-bottom: 0; }

/* Placeholders inside a panel lose the dashed purple box and read as
   muted text, so a half-finished page still looks like the finished one. */
.panel .todo {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--muted);
  font-style: italic;
}
.panel td .todo { padding: 0; font-size: inherit; }

/* The sticky heading keeps its left column; the panel takes the right. */
.environment-page #results h2 { grid-row: 1; }


/* ---- layout overrides for the Water Balloon page -------------------- */

/* A section that should run full width instead of the two-column
   case-study grid. Add class="full" to the section. */
.environment-page section.full .wrap,
.environment-page #overview.full .wrap,
.environment-page #results.full .wrap,
.environment-page #documents.full .wrap { display: block; }
.environment-page section.full h2,
.environment-page #overview.full h2,
.environment-page #results.full h2,
.environment-page #documents.full h2 {
  position: static;
  max-width: 14ch;
  margin-bottom: 1.5rem;
}
.environment-page section.full table { max-width: none; }
.environment-page section.full .gallery.charts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Text beside a tall diagram inside a panel */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(14rem, 1fr);
  gap: 2.5rem;
  align-items: start;
}
.split-text p:last-child { margin-bottom: 0; }
.split-figure {
  margin: 0;
  max-width: 22rem;
  justify-self: end;
}
.split-figure img {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

@media (max-width: 48rem) {
  .split { grid-template-columns: 1fr; }
  .split-figure { justify-self: start; }
  .environment-page section.full .gallery.charts { grid-template-columns: 1fr; }
}


/* Note under each source-code link explaining what the archive holds */
.code-note {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.75rem;
}
