/**
 * Subject areas for every audience: the routes version of a subject page and
 * of the subject index (includes/public/subject-routes.php).
 *
 * THE LOOK is the one Simon chose on the design canvas on 2026-11-19:
 *   - the banner: the site's title band over the subject's photograph, and a
 *     tile per route across its lower edge ("A"), which says whose courses are
 *     showing when the visitor arrived with a route ("D");
 *   - the courses: one list, the routes as tabs over it;
 *   - the subject's story: one band in the site's blue, its film rising out of
 *     the band's upper edge.
 *
 * COLOUR. Nothing here names a colour. Three sets of the theme's tokens do
 * the work, and each site fills them from its own palette (base-theme
 * css/tokens.css and each child's), so Doncaster is navy, teal, yellow and
 * blue, North Lindsey navy, teal and magenta, UCDon navy and sky, UCNL green:
 *   - the title band: --page-title-bg / -fg / -em / -muted;
 *   - the routes: --route-1 to --route-5, a fill and its label colour each. A
 *     route keeps its colour everywhere (tile, tab, the square beside a
 *     course). The markup says which slot ([data-route-slot]) and the first
 *     rule below turns that into --route-bg / --route-fg;
 *   - the story band: --surface-blue.
 *
 * TYPE. The minimum size is the theme's (--fs-min). Rules that set type are
 * written under .dncg-subject-area--routes or with two classes, because
 * dncg-core-styles.css resets headings under .dncg-subject-area-wrapper with a
 * class and an element, which outranks a lone class.
 */

/* ---- a route's colour ---- */
[data-route-slot="1"] { --route-bg: var(--route-1); --route-fg: var(--route-1-text); }
[data-route-slot="2"] { --route-bg: var(--route-2); --route-fg: var(--route-2-text); }
[data-route-slot="3"] { --route-bg: var(--route-3); --route-fg: var(--route-3-text); }
[data-route-slot="4"] { --route-bg: var(--route-4); --route-fg: var(--route-4-text); }
[data-route-slot="5"] { --route-bg: var(--route-5); --route-fg: var(--route-5-text); }

/* The square that carries a route's colour beside its name. */
.dncg-routes__key {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  border-radius: 4px;
  background: var(--route-bg);
}

/* Much of this page is shown and hidden by the route in play, and most of
   those elements set a display of their own, which would otherwise win over
   the attribute. */
.dncg-subject-area--routes [hidden] {
  display: none !important;
}

/* ---- the banner ----
   Sized to a laptop screen, not to the content: with the site's header above
   it, the band and its tiles end short of the fold on a 1366 by 768 or 1440
   by 900 screen, so the top of the course list shows and the page reads as
   going on. That is what the vh terms are for: on a short window the type and
   the band's padding give way first. */
.dncg-subject-hero {
  position: relative;
  background: var(--white);
}

.dncg-subject-hero__band {
  position: relative;
  overflow: hidden;
  background: var(--page-title-bg);
  color: var(--page-title-fg);
  /* The foot is where the tiles sit across the band's edge. */
  padding: clamp(1.6rem, 4.5vh, 3rem) 0 6.5rem;
}

.dncg-subject-hero--bare .dncg-subject-hero__band {
  padding-bottom: clamp(1.6rem, 4.5vh, 3rem);
}

.dncg-subject-hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: var(--page-title-media-opacity);
}

/* The band's own colour laid over the photograph, heavier on the side the
   words are on. */
.dncg-subject-hero__tint {
  position: absolute;
  inset: 0;
  background: var(--page-title-bg);
  opacity: .82;
}

@supports (background: color-mix(in srgb, currentColor 50%, transparent)) {
  .dncg-subject-hero__tint {
    background: linear-gradient(115deg, color-mix(in srgb, var(--page-title-bg) 95%, transparent) 0%, color-mix(in srgb, var(--page-title-bg) 66%, transparent) 100%);
    opacity: 1;
  }
}

/* padding-inline-start clears an overhanging site logo (--logo-clear in the
   theme's tokens.css, 0 for every brand but UCNL), as the theme's own title
   bands do. */
.dncg-subject-hero__text {
  position: relative;
  padding-inline-start: calc(var(--page-gutter) + var(--logo-clear));
}

.dncg-subject-area--routes .dncg-subject-hero__title {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(2.5rem, min(5.2vw, 9.5vh), 4.6rem);
  line-height: var(--display-lh-hero);
  letter-spacing: var(--display-track-hero);
  color: var(--page-title-fg);
  margin: 0 0 .8rem;
  text-wrap: balance;
}

/* A long name ("Sport, Physical Activity and Exercise Science") at that size
   would fill the screen before a single course. */
.dncg-subject-area--routes .dncg-subject-hero--long .dncg-subject-hero__title {
  max-width: 28ch;
  font-size: clamp(2.1rem, min(4vw, 7.5vh), 3.4rem);
}

.dncg-subject-hero__title em {
  font-style: var(--em-style);
  font-weight: inherit;
  color: var(--page-title-em);
}

.dncg-subject-area--routes .dncg-subject-hero__intro {
  max-width: 38rem;
  font-size: 1.25rem;
  line-height: 1.45;
  color: var(--page-title-muted);
  margin: 0;
}

/* The routes: the page's main action, across the band's lower edge. */
.dncg-subject-hero__ways {
  position: relative;
  margin-top: -4.6rem;
}

.dncg-subject-hero__routes {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

.dncg-subject-hero__routes li {
  flex: 1 1 14rem;
  display: flex;
  min-width: 0;
  margin: 0;
}

/* A subject with one route has one tile, and it is a tile, not a banner. */
.dncg-subject-hero__routes--one li {
  flex: 0 1 24rem;
}

/* The route that is showing takes more of the row. */
.dncg-subject-hero__routes li:has(> [aria-current]) {
  flex: 1.6 1 19rem;
}

/* A tile: its words, and an arrow at its foot. The words have the tile's
   whole width, so a long one ("apprenticeship") is never broken to make room
   for the arrow. */
.dncg-subject-area--routes .dncg-subject-hero__tile {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  min-width: 0;
  padding: 1.25rem 1.3rem 1.1rem 1.45rem;
  border-radius: var(--radius-md);
  background: var(--route-bg);
  color: var(--route-fg);
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transition: transform .18s ease;
}

/* The tiles are controls and sit square to the page, with no frame: tilted
   and framed in white they read as too playful (Simon, 2026-11-20), most of
   all on the university campuses. */

.dncg-subject-hero__routes li .dncg-subject-hero__tile:hover {
  transform: translateY(-.3rem);
}

.dncg-subject-hero__tile:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

.dncg-subject-hero__words {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  min-width: 0;
}

/* Who the route is for, in their words; and, on the tile of the route in
   play, what is showing. Sized to the tile so "apprenticeship" stays whole. */
.dncg-subject-hero__who,
.dncg-subject-hero__showing {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(1.3rem, 1.65vw, 1.65rem);
  line-height: 1.08;
  overflow-wrap: break-word;
}

.dncg-subject-hero__offer {
  font-size: var(--fs-min);
  font-weight: 600;
  line-height: 1.35;
}

.dncg-subject-hero__now {
  font-size: var(--fs-min);
  font-weight: 800;
}

.dncg-subject-hero__now,
.dncg-subject-hero__showing {
  display: none;
}

/* The arrow, in a disc of the tile's own label colour, at the tile's foot. */
.dncg-subject-hero__arrow {
  flex: 0 0 auto;
  align-self: flex-end;
  box-sizing: border-box;
  width: 2.4rem;
  height: 2.4rem;
  margin-top: auto;
  padding: .5rem;
  border-radius: 50%;
  background: var(--route-fg);
  color: var(--route-bg);
}

/* "D": the tile of the route that is showing says so, and points down the
   page at it. */
.dncg-subject-hero__tile[aria-current] .dncg-subject-hero__now,
.dncg-subject-hero__tile[aria-current] .dncg-subject-hero__showing {
  display: block;
}

.dncg-subject-hero__tile[aria-current] .dncg-subject-hero__who {
  display: none;
}

.dncg-subject-hero__tile[aria-current] .dncg-subject-hero__arrow {
  transform: rotate(90deg);
}

.dncg-subject-area--routes .dncg-subject-hero__all {
  font-size: var(--fs-min);
  font-weight: 700;
  color: var(--text);
  margin: 1.1rem 0 0;
}

.dncg-subject-area--routes .dncg-subject-hero__all a {
  color: var(--blue-text);
  text-decoration: underline;
  text-underline-offset: .2em;
}

@media (max-width: 40em) {
  .dncg-subject-hero__band {
    padding-bottom: 4.6rem;
  }

  .dncg-subject-hero__ways {
    margin-top: -3.2rem;
  }

  .dncg-subject-hero__routes {
    gap: .7rem;
  }

  .dncg-subject-hero__routes li {
    flex-basis: 100%;
  }

  /* One to a row: the arrow goes beside the words, not under them. */
  .dncg-subject-area--routes .dncg-subject-hero__tile {
    flex-direction: row;
    align-items: center;
    gap: .8rem;
  }

  .dncg-subject-hero__words {
    flex: 1 1 auto;
  }

  .dncg-subject-hero__arrow {
    align-self: center;
    margin-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dncg-subject-area--routes .dncg-subject-hero__tile {
    transition: none;
  }
}

/* ---- the courses ---- */
.dncg-routes {
  padding: 2.4rem 0 var(--space-section-sm);
  background: var(--white);
  /* Room for the sticky on-page nav when a link jumps here. */
  scroll-margin-top: 5rem;
}

.dncg-routes .dncg-routes__title {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(2.3rem, 4.6vw, 3.8rem);
  line-height: 1;
  color: var(--text-heading);
  margin: 0 0 1.5rem;
  text-wrap: balance;
}

.dncg-routes__title em {
  font-style: var(--em-style);
  font-weight: inherit;
  color: var(--blue-text);
}

/* The tabs: Everyone, then a route each, with its count and its colour. The
   subject index uses the same ones over its tiles. */
.dncg-routes__control {
  margin: 0 0 1.3rem;
}

.dncg-routes__control ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin: 0;
  padding: 0;
}

.dncg-routes__control li {
  margin: 0;
}

.dncg-routes .dncg-routes__control a,
.dncg-subject-areas-archive-wrapper .dncg-routes__control a {
  display: flex;
  align-items: center;
  gap: .6rem;
  min-height: 2.75rem;
  padding: .6rem 1.15rem;
  border: 2px solid var(--control-border);
  border-radius: var(--radius-md);
  background: var(--white);
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-heading);
  text-decoration: none;
}

.dncg-routes .dncg-routes__control a:hover,
.dncg-subject-areas-archive-wrapper .dncg-routes__control a:hover {
  border-color: var(--text-heading);
}

/* The tab in play is filled with its route's colour; Everyone, which has no
   colour of its own, with the site's dark. */
.dncg-routes .dncg-routes__control a[aria-current="true"],
.dncg-subject-areas-archive-wrapper .dncg-routes__control a[aria-current="true"] {
  border-color: var(--text-heading);
  background: var(--route-bg, var(--surface-dark-alt));
  color: var(--route-fg, var(--text-on-dark));
}

.dncg-routes__control a[aria-current="true"] .dncg-routes__key {
  display: none;
}

.dncg-routes__control a:focus-visible,
.dncg-list__how a:focus-visible,
.dncg-list__link:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.dncg-routes__n {
  font-weight: 600;
}

@media (max-width: 40em) {
  .dncg-routes__control ul {
    gap: .5rem;
  }

  .dncg-routes .dncg-routes__control a,
  .dncg-subject-areas-archive-wrapper .dncg-routes__control a {
    padding: .5rem .85rem;
    font-size: var(--fs-min);
  }
}

/* A route's own links (help with the cost, the subject at each campus). */
.dncg-route__links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .3rem 1.6rem;
  margin: 0 0 1.3rem;
  padding: 0;
}

.dncg-route__links li {
  margin: 0;
}

.dncg-routes .dncg-route__links a {
  font-size: var(--fs-min);
  font-weight: 700;
  color: var(--blue-text);
  text-decoration: underline;
  text-underline-offset: .2em;
}

/* ---- the list ---- */

/* How it's taught: the one other filter. A size quieter than the tabs above
   it, on purpose: who you are is the question, this only narrows the answer.
   So it is a line of small outlined choices, and the one in play is tinted,
   never filled dark as the tab in play is. */
.dncg-list__how {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem .9rem;
  margin: 0 0 1.2rem;
}

.dncg-list__how-label {
  font-size: var(--fs-min);
  color: var(--muted);
}

.dncg-list__how ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: 0;
  padding: 0;
}

.dncg-list__how li {
  margin: 0;
}

.dncg-routes .dncg-list__how a {
  display: inline-flex;
  align-items: center;
  min-height: 2.4rem;
  padding: .15rem .85rem;
  border: 1px solid var(--control-border);
  border-radius: var(--radius-pill);
  background: var(--white);
  font-size: var(--fs-min);
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.dncg-routes .dncg-list__how a:hover {
  border-color: var(--text-heading);
  color: var(--text-heading);
}

/* The second line of the border is drawn inside, so choosing one does not
   nudge its neighbours. */
.dncg-routes .dncg-list__how a[aria-current="true"] {
  border-color: var(--text-heading);
  background: var(--light);
  box-shadow: inset 0 0 0 1px var(--text-heading);
  color: var(--text-heading);
}

/* A level: a rule, its name once, and its courses beside it. The name and the
   first course sit on one baseline, whatever their sizes. */
.dncg-list {
  border-bottom: 2px solid var(--text-heading);
}

.dncg-list__level {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 2rem;
  border-top: 2px solid var(--text-heading);
  scroll-margin-top: 6rem;
}

.dncg-list__rail {
  flex: 0 0 9.5rem;
}

.dncg-routes .dncg-list__level-name {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 1.5rem;
  line-height: 1.15;
  color: var(--text-heading);
  margin: 0;
}

.dncg-list__body {
  flex: 999 1 30rem;
  min-width: 0;
}

.dncg-list__rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* A course: its name (with its code under it), how it is taught, how long,
   whose it is, and the compare tick. Narrow: the name on its own line and the facts under it.
   Wide (the last rule of this block): fixed columns, so every row's facts
   line up and nothing drops to a second line. */
.dncg-list__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .1rem 1.3rem;
  margin: 0;
  padding: .9rem 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-min);
  line-height: 1.4;
}

/* The last course showing in a level: the next level's rule follows it. */
.dncg-list__row[data-last] {
  border-bottom: 0;
}

/* The name's place in the row: the name, and under it the course code. */
.dncg-list__name {
  flex: 1 1 100%;
  min-width: 0;
}

/* The course code: small, grey and not a link, for whoever has to quote it. */
.dncg-list__code {
  display: block;
  margin-top: .2rem;
  font-size: var(--fs-min);
  font-weight: 400;
  color: var(--muted);
}

/* The name is the link, and is underlined so it looks like one. */
.dncg-routes .dncg-list__link {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-heading);
  text-decoration: underline;
  text-decoration-thickness: .07em;
  text-underline-offset: .2em;
}

.dncg-routes .dncg-list__link:hover {
  color: var(--blue-text);
  text-decoration-thickness: .14em;
}

.dncg-list__mode {
  color: var(--text);
}

/* Online is the answer people scan this column for. */
.dncg-list__mode--online {
  font-weight: 800;
  color: var(--blue-text);
}

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

.dncg-list__who {
  display: flex;
  flex-wrap: wrap;
  gap: .15rem 1rem;
  font-weight: 700;
  color: var(--text-heading);
}

.dncg-list__route,
.dncg-list__where {
  display: flex;
  align-items: baseline;
  gap: .5rem;
}

.dncg-list__who .dncg-routes__key {
  width: .85rem;
  height: .85rem;
  border-radius: 3px;
  transform: translateY(.06rem);
}

/* With one route showing, every row is that route's, so the column goes,
   unless the courses in view are taught at more than one place (the
   colleges' University level), when it says where. */
.dncg-routes:not([data-current="all"]) .dncg-list__route,
.dncg-routes:not([data-current="all"]) .dncg-list:not(.dncg-list--where) .dncg-list__who {
  display: none;
}

/* This site's own name beside its own courses: only where the courses in view
   are a mix of here and a campus, and one route is showing. */
.dncg-list__where--here {
  display: none;
}

.dncg-routes:not([data-current="all"]) .dncg-list--where .dncg-list__where--here {
  display: flex;
}

/* The compare tick (dncg-course-compare fills the slot). On a card it is in
   the link colour; forty of those down a list would shout over the courses,
   so here it is quiet until it is ticked. */
.dncg-list__compare {
  margin-inline-start: auto;
}

.dncg-list__compare .dncg-cc-check {
  padding: 0;
  font-weight: 600;
  color: var(--muted);
}

.dncg-list__compare .dncg-cc-check.is-on {
  font-weight: 700;
  color: var(--text-heading);
}

/* Narrow: the level's name over its courses, with the room a row has. */
@media (max-width: 48em) {
  .dncg-list__rail {
    flex: 1 1 100%;
    padding-top: .9rem;
  }
}

/* Wide: columns. The fourth (whose course, or where) is only there when it
   has something to say. */
@media (min-width: 75em) {
  .dncg-list__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 7.5rem 7.5rem 11.5rem 6.5rem;
    gap: 0 1.4rem;
  }

  .dncg-routes:not([data-current="all"]) .dncg-list:not(.dncg-list--where) .dncg-list__row {
    grid-template-columns: minmax(0, 1fr) 7.5rem 7.5rem 6.5rem;
  }

  .dncg-list__who {
    flex-direction: column;
    flex-wrap: nowrap;
  }

  .dncg-list__compare {
    justify-self: end;
    margin-inline-start: 0;
  }
}

/* ---- where the apprenticeships are, after every other view ---- */
.dncg-routes__pointer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-top: 2.2rem;
  padding: 1.5rem 1.8rem;
  border-radius: var(--radius-lg);
  background: var(--route-bg);
  color: var(--route-fg);
}

.dncg-routes__pointer-text {
  flex: 1 1 24rem;
  min-width: 0;
}

.dncg-routes .dncg-routes__pointer-title {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 1.9rem;
  line-height: 1.1;
  color: inherit;
  margin: 0 0 .3rem;
}

.dncg-routes .dncg-routes__pointer p {
  font-size: var(--fs-min);
  color: inherit;
  margin: 0;
}

.dncg-routes .dncg-routes__pointer p a {
  font-weight: 700;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: .2em;
}

/* The view's one filled button, in the site's accent button pair. */
.dncg-routes .dncg-routes__pointer-button {
  flex: 0 0 auto;
  padding: .95rem 1.6rem;
  border-radius: var(--radius-pill);
  background: var(--btn-accent-bg);
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 1.2rem;
  color: var(--btn-accent-text);
  text-decoration: none;
}

.dncg-routes__pointer-button:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--focus-halo);
}

/* ---- the apprenticeship route: jobs, not rows (partials/route-jobs.php) ----
   Three steps side by side: a vacancy (the view's one filled button),
   registering interest, and finding out more on the subject's own
   apprenticeship page. Then a quiet last line for how it works and employers. */
.dncg-jobs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: var(--gap-grid-lg, 1.3rem);
  padding-top: 1.6rem;
  border-top: 3px solid var(--text-heading);
}

.dncg-jobs__step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .6rem;
  padding: var(--pad-card);
  background: var(--light);
  border-radius: var(--radius-lg);
}

.dncg-routes .dncg-jobs__title {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 1.7rem;
  color: var(--text-heading);
  margin: 0;
}

.dncg-routes .dncg-jobs__text {
  font-size: var(--fs-min);
  color: var(--text);
  margin: 0;
}

.dncg-jobs__button {
  margin-top: auto;
}

/* The second step's link: drawn as a control, not filled. */
.dncg-routes .dncg-jobs__second {
  padding: .85rem 1.5rem;
  border: 2px solid var(--text-heading);
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 1.2rem;
  color: var(--text-heading);
  text-decoration: none;
}

.dncg-jobs__second:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

.dncg-jobs__last strong {
  color: var(--text-heading);
}

.dncg-routes .dncg-jobs__last {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 2.4rem;
  font-size: var(--fs-min);
  color: var(--text);
  margin: .4rem 0 0;
}

.dncg-routes .dncg-jobs__last a {
  font-weight: 700;
  color: var(--blue-text);
  text-decoration: underline;
  text-underline-offset: .2em;
}

/* ---- the subject's own story (partials/story-block.php) ----
   The course pages' look: a light ground, the subject's own words with the
   phrases the editor made bold as marker highlights, a student on a dark card
   beside them, the points as cards, and a last row for what it looks like and
   when to come and see it. */
.dncg-story {
  padding: var(--space-section) 0;
  background: var(--light);
}

.dncg-story__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.4rem 4rem;
  align-items: start;
}

.dncg-subject-area--routes .dncg-story__title {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(2.3rem, 4.6vw, 3.8rem);
  line-height: 1;
  letter-spacing: var(--display-track);
  color: var(--text-heading);
  margin: 0 0 1.5rem;
  text-wrap: balance;
}

.dncg-story__title em {
  font-style: var(--em-style);
  font-weight: inherit;
  color: var(--blue-text);
}

.dncg-subject-area--routes .dncg-story__prose,
.dncg-subject-area--routes .dncg-story__prose p {
  max-width: 62ch;
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--text);
}

.dncg-subject-area--routes .dncg-story__prose p {
  margin: 0 0 1.1rem;
}

.dncg-story__prose > :last-child {
  margin-bottom: 0;
}

/* A phrase the editor made bold: a marker stroke under the words, as the
   course pages draw theirs (.learn-copy__highlight). */
.dncg-subject-area--routes .dncg-story__prose strong,
.dncg-subject-area--routes .dncg-story__prose b {
  padding: 0 .1em;
  font-weight: 700;
  color: var(--text-heading);
  background: linear-gradient(transparent 58%, rgba(var(--accent-rgb), .45) 58%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* A student, in their own words: a dark card, their picture breaking out of
   its top. */
.dncg-story__voice {
  position: relative;
  margin: 0;
  padding: 2.1rem 2.1rem 1.9rem;
  border-radius: var(--radius-lg);
  background: var(--surface-dark-alt);
  color: var(--text-on-dark);
}

.dncg-story__voice--face {
  margin-top: 4.6rem;
}

/* A photograph gets a frame, a plain rectangle (the arched top it had read
   as a tombstone); a cut-out stands on its own. */
.dncg-story__face {
  position: absolute;
  right: 1.5rem;
  top: -4.2rem;
  width: 7.5rem;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 6px solid var(--white);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-md);
  transform: rotate(calc(2deg * var(--tilt-scale, 1)));
}

.dncg-story__face--cutout {
  top: -4.6rem;
  width: 8.5rem;
  height: 11rem;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center bottom;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.dncg-story__mark {
  display: block;
  width: 3rem;
  height: auto;
  color: var(--accent-on-dark);
}

.dncg-subject-area--routes .dncg-story__quote {
  margin: 1.3rem 0 1.2rem;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
}

/* Room for the picture, which comes down into the card beside the mark. */
.dncg-subject-area--routes .dncg-story__voice--face .dncg-story__quote {
  margin-top: 2.6rem;
}

.dncg-subject-area--routes .dncg-story__quote p {
  font-size: 1.2rem;
  line-height: 1.5;
  color: inherit;
  margin: 0;
}

.dncg-subject-area--routes .dncg-story__quote .dncg-story__pull {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 1.7rem;
  line-height: 1.25;
  margin: 0 0 1rem;
}

/* A quote with no short sentence is set whole, a size down. */
.dncg-subject-area--routes .dncg-story__quote .dncg-story__pull--whole {
  font-size: 1.35rem;
  line-height: 1.4;
  margin: 0;
}

.dncg-story__who {
  font-size: var(--fs-min);
  font-weight: 700;
  color: var(--accent-on-dark-text);
}

/* What makes the subject different: a card a point. */
.dncg-story__points {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr));
  gap: 1.1rem;
  margin: 3rem 0 0;
  padding: 0;
}

.dncg-story__points li {
  margin: 0;
  padding: 1.3rem 1.3rem 1.4rem;
  border-top: 6px solid var(--route-1);
  border-radius: var(--radius-md);
  background: var(--white);
  font-size: var(--fs-min);
  line-height: 1.5;
  color: var(--muted);
}

.dncg-story__points li:nth-child(3n + 2) {
  border-top-color: var(--surface-blue);
}

.dncg-story__points li:nth-child(3n + 3) {
  border-top-color: var(--surface-dark-alt);
}

.dncg-story__points strong {
  display: block;
  margin-bottom: .4rem;
  font-size: 1.25rem;
  line-height: 1.2;
  color: var(--text-heading);
}

/* The last row: the film, the photographs, the open event. One column until
   there is room; then a layout for each set the subject can have. */
.dncg-story__see {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.8rem 2rem;
  align-items: stretch;
  margin-top: 3rem;
}

.dncg-story__film {
  align-self: center;
  overflow: hidden;
  border: 8px solid var(--white);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-lg);
  transform: rotate(calc(-.8deg * var(--tilt-scale, 1)));
}

.dncg-story__shots {
  align-content: center;
}

/* The open event: a date, and the block's one filled button. */
.dncg-story__event {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.dncg-subject-area--routes .dncg-story__date {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin: 0;
  padding: 1.3rem 1.7rem;
  background: var(--btn-accent-bg);
  color: var(--btn-accent-text);
}

.dncg-story__day {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 4rem;
  line-height: .9;
}

.dncg-story__when {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.dncg-story__month {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 1.7rem;
  line-height: 1;
}

.dncg-story__time {
  font-size: var(--fs-min);
  font-weight: 600;
  line-height: 1.3;
}

.dncg-story__event-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .5rem;
  padding: 1.5rem 1.7rem 1.7rem;
}

.dncg-subject-area--routes .dncg-story__event-title {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 1.6rem;
  line-height: 1.15;
  color: var(--text-heading);
  margin: 0;
}

.dncg-subject-area--routes .dncg-story__event-text {
  flex-grow: 1;
  font-size: 1.2rem;
  color: var(--text);
  margin: 0 0 1rem;
}

.dncg-subject-area--routes .dncg-story__event-button {
  padding: .9rem 1.6rem;
  border-radius: var(--radius-pill);
  background: var(--surface-dark-alt);
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 1.2rem;
  color: var(--text-on-dark);
  text-decoration: none;
}

.dncg-story__event-button:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

/* On its own (no film, no photographs) the card keeps a card's width. */
.dncg-story__see--event .dncg-story__event {
  max-width: 24rem;
}

@media (min-width: 64em) {
  .dncg-story__top--voice {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  }

  /* The film or the photographs, and the date card. */
  .dncg-story__see--film-event,
  .dncg-story__see--shots-event {
    grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr);
  }

  /* All three: the film, two photographs one over the other, the date card. */
  .dncg-story__see--film-shots-event {
    grid-template-columns: minmax(0, 2.1fr) minmax(0, .8fr) minmax(0, 1fr);
  }

  .dncg-story__see--film-shots-event .dncg-story__shots[data-shots] {
    grid-template-columns: minmax(0, 1fr);
    max-width: none;
  }

  /* The film and the photographs, no event: the photographs two by two. */
  .dncg-story__see--film-shots {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  }

  .dncg-story__see--film-shots .dncg-story__shots[data-shots],
  .dncg-story__see--shots-event .dncg-story__shots[data-shots] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }

  /* The film alone. */
  .dncg-story__see--film .dncg-story__film {
    max-width: 56rem;
  }
}

/* ---- where you'll learn: facilities (partials/story-facilities.php) ----
   A facility is its photograph, in the film's white frame, beside its name
   and the editor's words. */
.dncg-place {
  padding: var(--space-section) 0;
  background: var(--white);
}

.dncg-subject-area--routes .dncg-place__title,
.dncg-subject-area--routes .dncg-shots__title,
.dncg-subject-area--routes .dncg-next__title {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(2.3rem, 4.6vw, 3.8rem);
  line-height: 1;
  letter-spacing: var(--display-track);
  color: var(--text-heading);
  margin: 0 0 2.2rem;
  text-wrap: balance;
}

.dncg-place__title em,
.dncg-shots__title em,
.dncg-next__title em {
  font-style: var(--em-style);
  font-weight: inherit;
  color: var(--blue-text);
}

.dncg-place__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.8rem 4rem;
  align-items: center;
}

.dncg-place__item + .dncg-place__item {
  margin-top: 3.5rem;
}

.dncg-place__photo {
  margin: 0;
  border: 8px solid var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: rotate(calc(-1.2deg * var(--tilt-scale, 1)));
}

.dncg-place__item:nth-of-type(even) .dncg-place__photo {
  transform: rotate(calc(1.2deg * var(--tilt-scale, 1)));
}

.dncg-place__photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.dncg-subject-area--routes .dncg-place__name {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(1.7rem, 2.6vw, 2.2rem);
  line-height: 1.1;
  color: var(--text-heading);
  margin: 0 0 .9rem;
}

.dncg-subject-area--routes .dncg-place__prose,
.dncg-subject-area--routes .dncg-place__prose p,
.dncg-subject-area--routes .dncg-place__prose li {
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--text);
}

.dncg-subject-area--routes .dncg-place__prose p {
  margin: 0 0 1rem;
}

.dncg-place__prose > :last-child {
  margin-bottom: 0;
}

/* The editor's list, each line with the page's one tick: a disc in the first
   route colour, the tick cut out of it in that colour's label colour. */
.dncg-subject-area--routes .dncg-place__prose ul {
  list-style: none;
  display: grid;
  gap: .55rem;
  margin: 0 0 1.1rem;
  padding: 0;
}

.dncg-subject-area--routes .dncg-place__prose li {
  position: relative;
  margin: 0;
  padding-inline-start: 2.3rem;
  font-weight: 600;
  color: var(--text-heading);
}

.dncg-place__prose li::before,
.dncg-place__prose li::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: .12em;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
}

.dncg-place__prose li::before {
  background: var(--route-1);
}

.dncg-place__prose li::after {
  background: var(--route-1-text);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.6 16.6 5.4 12.4 4 13.8l5.6 5.6 10.6-10.6-1.4-1.4z'/%3E%3C/svg%3E") center / 72% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.6 16.6 5.4 12.4 4 13.8l5.6 5.6 10.6-10.6-1.4-1.4z'/%3E%3C/svg%3E") center / 72% no-repeat;
}

@media (min-width: 64em) {
  .dncg-place__item {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  }

  .dncg-place__item--plain {
    grid-template-columns: minmax(0, 1fr);
    max-width: 52rem;
  }

  /* Two or more alternate sides. */
  .dncg-place__item:nth-of-type(even) .dncg-place__photo {
    order: 2;
  }
}

/* ---- the subject in pictures (partials/story-gallery.php) ----
   Four photographs, each in a white frame and a little off square like the
   banner's tiles; the fourth a stack of cards when there are more. With a
   film: the four as a two-by-two, the film beside them. */
.dncg-shots {
  padding: var(--space-section) 0;
  background: var(--light);
}

.dncg-shots__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem 3rem;
  align-items: center;
}

.dncg-shots__grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
  margin: 0;
  padding: 0;
}

.dncg-shots__grid li {
  margin: 0;
}

.dncg-shots__tile {
  position: relative;
  display: block;
  transition: transform .18s ease;
}

/* How far off square a photograph sits is the site's (--tilt-scale, in the
   theme's tokens): 1 on the colleges, 0 on the university campuses. */
.dncg-shots__grid li:nth-child(4n + 1) .dncg-shots__tile { transform: rotate(calc(-1.2deg * var(--tilt-scale, 1))); }
.dncg-shots__grid li:nth-child(4n + 2) .dncg-shots__tile { transform: rotate(calc(.9deg * var(--tilt-scale, 1))); }
.dncg-shots__grid li:nth-child(4n + 3) .dncg-shots__tile { transform: rotate(calc(.7deg * var(--tilt-scale, 1))); }
.dncg-shots__grid li:nth-child(4n + 4) .dncg-shots__tile { transform: rotate(calc(-.8deg * var(--tilt-scale, 1))); }

.dncg-shots__grid li .dncg-shots__tile:hover {
  transform: translateY(-.3rem);
}

.dncg-shots__tile:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 4px;
}

.dncg-shots__frame {
  position: relative;
  display: block;
  overflow: hidden;
  border: 6px solid var(--white);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.dncg-shots__frame img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* The stack: two more cards showing behind the last photograph, and how many
   more there are across it. */
.dncg-shots__tile--stack::before,
.dncg-shots__tile--stack::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.dncg-shots__tile--stack::before {
  transform: rotate(5deg) translate(.5rem, .2rem);
}

.dncg-shots__tile--stack::after {
  transform: rotate(-4deg) translate(-.35rem, .3rem);
}

.dncg-shots__tile--stack .dncg-shots__frame {
  z-index: 1;
}

.dncg-shots__more {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--tint-rgb), .68);
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  color: var(--white);
}

/* The film, in the page's white frame. */
.dncg-shots__film {
  overflow: hidden;
  border: 8px solid var(--white);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-lg);
  transform: rotate(calc(1.2deg * var(--tilt-scale, 1)));
}

.dncg-shots--film-only .dncg-shots__film {
  max-width: 52rem;
}

@media (min-width: 64em) {
  /* Photographs only: four in a row (fewer share the row). */
  .dncg-shots__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .dncg-shots__grid[data-shots="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dncg-shots__grid[data-shots="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 52rem; }
  .dncg-shots__grid[data-shots="1"] { grid-template-columns: minmax(0, 1fr); max-width: 32rem; }

  /* With a film: two by two, and the film beside them. */
  .dncg-shots--film:not(.dncg-shots--film-only) .dncg-shots__layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  }

  .dncg-shots--film .dncg-shots__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dncg-shots__tile {
    transition: none;
  }
}

/* ---- where the subject can take you (partials/where-next.php) ----
   Jobs as a card of bars, each as long as its pay; further study as a card a
   place. */
.dncg-next {
  padding: var(--space-section) 0;
  background: var(--light);
  scroll-margin-top: 5rem;
}

.dncg-next__cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.dncg-subject-area--routes .dncg-next__head {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 1.7rem;
  line-height: 1.15;
  color: var(--text-heading);
  margin: 0;
}

.dncg-next__unit {
  font-size: var(--fs-min);
  font-weight: 400;
  color: var(--muted);
}

/* The jobs. */
.dncg-next__jobs {
  padding: 2rem 2.2rem 2.2rem;
  border-radius: var(--radius-lg);
  background: var(--white);
}

.dncg-next__head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .2rem 1.5rem;
  margin-bottom: 1.4rem;
}

.dncg-next__list {
  list-style: none;
  display: grid;
  gap: 1.05rem;
  margin: 0;
  padding: 0;
}

.dncg-next__list li {
  margin: 0;
}

.dncg-next__line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .1rem 1.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-heading);
}

.dncg-next__pay {
  flex: 0 0 auto;
}

/* A bar: as long as the job's pay, against the highest paid. */
.dncg-next__track {
  display: block;
  height: .8rem;
  margin-top: .35rem;
  border-radius: 4px;
  background: var(--light);
}

.dncg-next__bar {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--surface-dark-alt);
}

.dncg-next__bar--2 {
  background: var(--surface-blue);
}

.dncg-next__bar--3 {
  background: var(--btn-accent-bg);
}

/* Further study: a card a place. */
.dncg-next__study .dncg-next__head {
  margin: .4rem 0 1.1rem;
}

.dncg-next__places {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 1.1rem;
  margin: 0;
  padding: 0;
}

.dncg-next__places li {
  display: flex;
  margin: 0;
}

.dncg-subject-area--routes .dncg-next__place {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.4rem 1.6rem;
  border-radius: var(--radius-lg);
  background: var(--surface-dark-alt);
  color: var(--text-on-dark);
  text-decoration: none;
  transition: transform .18s ease;
}

.dncg-subject-area--routes .dncg-next__place:hover {
  transform: translateY(-.2rem);
}

.dncg-next__place:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

.dncg-next__place-text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--fs-min);
  line-height: 1.4;
}

.dncg-next__place-text strong {
  display: block;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 1.45rem;
  line-height: 1.15;
  color: inherit;
}

.dncg-next__levels {
  white-space: nowrap;
}

.dncg-next__arrow {
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 2.6rem;
  height: 2.6rem;
  padding: .55rem;
  border-radius: 50%;
  background: var(--btn-accent-bg);
  color: var(--btn-accent-text);
}

/* This college's own university-level courses: the light one of the set. */
.dncg-subject-area--routes .dncg-next__place--here {
  background: var(--white);
  color: var(--text);
}

.dncg-next__place--here strong {
  color: var(--text-heading);
}

.dncg-next__place--here .dncg-next__arrow {
  background: var(--surface-dark-alt);
  color: var(--text-on-dark);
}

/* Jobs on their own keep a readable width. */
.dncg-next__cols:not(.dncg-next__cols--both) .dncg-next__jobs {
  max-width: 52rem;
}

@media (min-width: 64em) {
  .dncg-next__cols--both {
    grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr);
  }

  /* Beside the jobs the places are a column. */
  .dncg-next__cols--both .dncg-next__places {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 40em) {
  .dncg-next__jobs {
    padding: 1.4rem 1.3rem 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dncg-subject-area--routes .dncg-next__place {
    transition: none;
  }
}

/* ---- the sections after the band ----
   Facilities, the gallery and news keep their own layouts. What they share
   with the rest of this page is how a section starts: its heading and nothing
   above it, so the small label each carried over its heading is not shown
   here. */
.dncg-subject-area--routes .dncg-eyebrow {
  display: none;
}

/* ---- Ready to apply? ----
   A dark band with the headline; the chooser rises out of the band's upper
   edge into the section above. */
.dncg-chooser {
  background: var(--surface-dark);
  margin-top: 5rem;
  padding: 0 0 var(--space-section-sm);
  scroll-margin-top: 9rem;
}

.dncg-chooser__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.6rem 4rem;
  align-items: start;
}

.dncg-chooser__text {
  padding-top: var(--space-section-sm);
}

.dncg-subject-area--routes .dncg-chooser__title {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: .95;
  color: var(--text-on-dark);
  margin: 0 0 1rem;
}

.dncg-subject-area--routes .dncg-chooser__intro {
  font-size: 1.25rem;
  line-height: 1.45;
  color: var(--text-on-dark);
  max-width: 26rem;
  margin: 0;
}

@media (min-width: 64em) {
  .dncg-chooser__grid {
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  }

  .dncg-chooser__tree {
    margin-top: -4rem;
  }
}

/* ---- the subject index ---- */
.dncg-subject-areas-archive-wrapper .dncg-routes__control {
  margin-bottom: 1.2rem;
}
