/* Undergraduate programmes: the hub (templates/public/programs.html) and each programme (program.html).
   The look of a product launch drawn on engineering paper: dark drafting-grid sections, one accent per programme from
   the site's own colours (ME crimson, EMME amber, DMRIE teal). --acc is dark enough for text on white, --acc-hi light
   enough for text on the dark sections. The one big moving thing is the blueprint that builds itself year by year. */
.acc-crimson { --acc: var(--crimson); --acc-hi: #f2a7a4; --acc-soft: #f7ecec; }
.acc-heat { --acc: #7a4a00; --acc-hi: #ffb547; --acc-soft: #fdf3e2; }
.acc-blueprint { --acc: #1b5f64; --acc-hi: #8fd0d4; --acc-soft: #e8f4f5; }
.pg-page { --night: #0d2630; --night-2: #0a1f27; --bp: #8fd0d4; }
.pg-page.acc-blueprint { --bp: #b4c3c8; }      /* its accent is the blueprint teal: the lines already drawn go grey */

/* drafting paper: the dark sections */
.pg-hero, .hub-hero, .pg-story { background: var(--night); color: #fff;
  background-image: linear-gradient(rgba(143, 208, 212, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(143, 208, 212, .07) 1px, transparent 1px);
  background-size: 24px 24px; }
.pg-hero .crumbs, .hub-hero .crumbs { font-size: .92rem; color: #b9c9cd; margin-bottom: .8rem; }
.pg-hero .crumbs a, .hub-hero .crumbs a { color: #d6e3e6; display: inline-block; padding: .2rem 0; }
.pg-h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 600; line-height: 1.25; letter-spacing: -.01em; margin: 0 0 .6rem; }
.pg-note { color: var(--muted); margin: 0 0 1.2rem; }
.pg-btns { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.2rem; }

/* ================================================================ a programme */
/* 1. the product */
.pg-hero { padding: clamp(22px, 3.5vw, 40px) 0 clamp(44px, 7vw, 88px); overflow: hidden; }
.pg-hero-in { display: grid; gap: clamp(24px, 4vw, 56px); align-items: center; margin-top: clamp(8px, 2vw, 20px); }
@media (min-width: 900px) { .pg-hero-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); } }
.pg-abbr { margin: 0; font-size: clamp(3.6rem, 11vw, 8.5rem); font-weight: 600; line-height: .95; letter-spacing: .02em;
  color: transparent; -webkit-text-stroke: 2px var(--acc-hi); }
.pg-name { margin: .9rem 0 0; font-size: clamp(1.6rem, 3.6vw, 2.7rem); font-weight: 600; line-height: 1.25; }
.pg-headline { margin: .5rem 0 0; font-size: clamp(1.2rem, 2.3vw, 1.75rem); font-weight: 300; line-height: 1.45; color: rgba(255, 255, 255, .88); }
.pg-degree { margin: .9rem 0 0; color: #b9c9cd; font-size: .98rem; }
.pg-chips { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem .5rem; }
.pg-chips li { border: 1px solid var(--acc-hi); color: var(--acc-hi); border-radius: 999px; padding: 0 .7rem; font-size: .88rem; line-height: 1.8; }
.pg-chips .cr { border-color: transparent; color: rgba(255, 255, 255, .75); padding-left: .1rem; }
.pg-hero-btns { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.6rem; }
.pg-btn { background: var(--acc-hi); border-color: var(--acc-hi); color: var(--night); }
.pg-btn:hover, .pg-btn:focus-visible { background: #fff; border-color: #fff; color: var(--night); }
.pg-poster { margin: 0; }
.pg-poster img { width: 100%; height: auto; border-radius: 14px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7); }
.pg-poster.is-emme img { width: auto; max-width: 100%; max-height: min(78vh, 640px); margin-inline: auto; }
/* the one entrance: the letters, then the poster, as the page opens */
@media (prefers-reduced-motion: no-preference) {
  .pg-abbr { animation: pg-in .9s var(--ease) both; }
  .pg-name, .pg-headline { animation: pg-in .9s var(--ease) .12s both; }
  .pg-poster img { animation: pg-poster 1.1s var(--ease) .2s both; }
}
@keyframes pg-in { from { opacity: 0; transform: translateY(18px); } }
@keyframes pg-poster { from { opacity: 0; transform: scale(.96) translateY(12px); } }

/* 2. what it is */
.pg-define { padding: clamp(48px, 7vw, 96px) 0; }
.pg-senses { list-style: none; counter-reset: s; margin: 1.4rem 0 0; padding: 0; display: grid; gap: clamp(18px, 2.4vw, 28px); max-width: 60rem; }
.pg-senses li { counter-increment: s; display: grid; grid-template-columns: clamp(2.6rem, 6vw, 4.2rem) minmax(0, 1fr); align-items: baseline;
  font-size: clamp(1.2rem, 2.3vw, 1.7rem); font-weight: 300; line-height: 1.45; }
.pg-senses li::before { content: counter(s); font-size: 1.6em; font-weight: 600; line-height: 1; color: transparent; -webkit-text-stroke: 1.5px var(--acc); }
.pg-spec { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: clamp(32px, 5vw, 56px) 0 0; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
@media (min-width: 760px) { .pg-spec { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pg-spec > div { background: #fff; padding: 1rem 1.2rem; }
.pg-spec dt { color: var(--muted); font-size: .9rem; }
.pg-spec dd { margin: .1rem 0 0; font-size: clamp(1.3rem, 2.4vw, 1.9rem); font-weight: 600; color: var(--acc); line-height: 1.25; }

/* 3. four years: the drawing beside (on a phone: above) the years, and builds as each year passes */
.pg-story { padding: clamp(48px, 7vw, 96px) 0; }
.pg-story .pg-h2 { color: #fff; }
.pg-story-lead { color: rgba(255, 255, 255, .78); max-width: 40rem; margin: 0 0 clamp(20px, 3vw, 36px); }
.pg-story-in { display: grid; gap: clamp(16px, 3vw, 48px); align-items: start; }
/* --hdr: the site header's height, measured by js/programs.js (the drawing stays just below it) */
.bp { margin: 0; position: sticky; top: calc(var(--hdr, 84px) + 8px); z-index: 2; }
@media (min-width: 900px) { .pg-story-in { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); } }
@media (max-width: 899px) {
  .bp { top: var(--hdr, 84px); padding: 8px 0 10px; background: var(--night); margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
  .bp-svg { max-height: 36svh; }
}
.bp-svg { display: block; width: 100%; height: auto; border-radius: 14px; background: var(--night-2); border: 1px solid rgba(143, 208, 212, .22); }
.bp-gridline { fill: none; stroke: rgba(143, 208, 212, .1); stroke-width: .6; }
.bp-svg .d { fill: none; stroke: var(--bp); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: stroke .4s, stroke-width .2s; }
.bp-svg .f { fill: var(--bp); transition: opacity .6s, fill .4s; }
.bp-svg .bp-flow { fill: none; stroke: rgba(255, 255, 255, .6); stroke-width: 1.4; stroke-dasharray: 6 14; opacity: 0; transition: opacity .6s; }
.bp-title rect, .bp-title path { fill: none; stroke: rgba(143, 208, 212, .5); stroke-width: 1; }
.bp-title text { fill: var(--bp); font: 500 11px var(--font); letter-spacing: .08em; }
.bp-now { position: absolute; top: 12px; right: 12px; }
.bp-now span { display: inline-block; background: var(--acc-hi); color: var(--night); font-weight: 600; font-size: .85rem; border-radius: 999px; padding: .1rem .7rem; }
.bp:not(.is-live) .bp-now { display: none; }
@media (max-width: 899px) { .bp-now { top: 16px; right: calc(var(--gutter) + 10px); } }
/* js/programs.js makes it live: a year's parts are drawn when the reader reaches it, the current year's in the accent */
.bp.is-live .bp-g .d { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.3s var(--ease), stroke .4s, stroke-width .2s; }
.bp.is-live .bp-g .f { opacity: 0; }
.bp.is-live .bp-g.is-done .d, .bp.is-live .bp-g.is-now .d { stroke-dashoffset: 0; }
.bp.is-live .bp-g.is-done .f, .bp.is-live .bp-g.is-now .f { opacity: 1; }
.bp.is-live .bp-g.is-now .d { stroke: var(--acc-hi); stroke-width: 2.3; }
.bp.is-live:not(.is-running) .bp-g.is-done .d { stroke-opacity: .62; }    /* the years already passed step back a little */
.bp.is-live .bp-g.is-now .f { fill: var(--acc-hi); }
.bp .bp-g.is-hot .d { stroke: #fff; stroke-width: 2.8; }
.bp .bp-g.is-hot .f { fill: #fff; }
/* the finished machine runs */
.bp.is-running .bp-spin { animation: bp-spin 1.1s linear infinite; }
.bp.is-running .bp-flow { opacity: 1; animation: bp-flow 1.2s linear infinite; }
.bp.is-running .bp-belt { animation: bp-belt 3s linear infinite; }
.bp.is-running .bp-swing { animation: bp-swing 4s ease-in-out infinite; }
@keyframes bp-spin { to { transform: rotate(-360deg); } }
@keyframes bp-flow { to { stroke-dashoffset: 40; } }
@keyframes bp-belt { from { transform: translateX(0); } to { transform: translateX(120px); } }
@keyframes bp-swing { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-18deg); } }

.pg-years { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.pg-year { padding: clamp(18px, 3vw, 28px) 0 clamp(28px, 6vh, 64px) 1.2rem; border-left: 2px solid rgba(143, 208, 212, .2); min-height: 62vh;
  transition: border-color .3s, opacity .3s; }
.pg-year:last-child { min-height: 0; }
.pg-story.is-live .pg-year:not(.is-now) { opacity: .5; }
.pg-year.is-now { border-left-color: var(--acc-hi); }
@media (max-width: 899px) { .pg-year { min-height: 0; padding-bottom: 36px; } }
.pg-yr { margin: 0; color: var(--acc-hi); font-weight: 600; font-size: .95rem; }
.pg-year h3 { margin: .1rem 0 .9rem; font-size: clamp(1.3rem, 2.4vw, 1.75rem); font-weight: 600; color: #fff; }
.pg-subjects { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.pg-subjects li { display: grid; gap: .1rem; padding: .65rem .85rem; border-radius: 10px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(143, 208, 212, .14);
  cursor: default; transition: background-color .2s, border-color .2s; }
.pg-subjects li:hover, .pg-subjects li:focus-visible, .pg-subjects li.is-hot { background: rgba(255, 255, 255, .1); border-color: var(--acc-hi); outline: none; }
.pg-subjects b { font-weight: 500; color: #fff; line-height: 1.4; }
.pg-subjects span { color: rgba(255, 255, 255, .72); font-size: .93rem; line-height: 1.5; }

/* 4. the last year's choice (tabs once js/programs.js runs; without it every group is shown) */
.pg-choice { padding: clamp(48px, 7vw, 96px) 0; }
.pg-tablist { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
.pg-tablist[hidden] { display: none; }
.pg-tablist button { font: inherit; font-size: .95rem; display: inline-flex; align-items: center; gap: .45rem; cursor: pointer; padding: .55rem .95rem;
  border-radius: 999px; border: 1px solid #b9c3c9; background: #fff; color: var(--ink); transition: background-color .15s, color .15s, border-color .15s; }
.pg-tablist button:hover { border-color: var(--ink); }
.pg-tablist button[aria-selected="true"] { background: var(--acc); border-color: var(--acc); color: #fff; }
.pg-panels { display: grid; gap: 14px; }
@media (min-width: 760px) { .pg-tabs:not(.is-tabs) .pg-panels { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .pg-tabs:not(.is-tabs) .pg-panels { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pg-panel { background: var(--acc-soft); border-radius: 14px; padding: 1.2rem 1.3rem 1.3rem; }
.pg-panel[hidden] { display: none; }
.pg-tabs.is-tabs .pg-panel { padding: clamp(1.3rem, 3vw, 2rem); animation: pg-panel .35s var(--ease) both; }
@keyframes pg-panel { from { opacity: 0; transform: translateY(8px); } }
.pg-panel h3 { display: flex; align-items: center; gap: .55rem; margin: 0 0 .7rem; color: var(--acc); font-size: 1.15rem; }
.pg-tabs.is-tabs .pg-panel h3 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
.pg-panel ul { margin: 0; padding: 0 0 0 1.1rem; display: grid; gap: .25rem; }
@media (min-width: 760px) { .pg-tabs.is-tabs .pg-panel ul { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; } }
.pg-ico { display: inline-block; flex: none; width: 1.25em; height: 1.25em; background-color: currentColor;
  -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
.pg-ico-car { --ico: url("../img/programs/icons/car.svg"); } .pg-ico-building { --ico: url("../img/programs/icons/building.svg"); }
.pg-ico-sun { --ico: url("../img/programs/icons/sun.svg"); } .pg-ico-gear { --ico: url("../img/programs/icons/gear.svg"); }
.pg-ico-train { --ico: url("../img/programs/icons/train.svg"); } .pg-ico-chart { --ico: url("../img/programs/icons/chart.svg"); }
.pg-ico-flame { --ico: url("../img/programs/icons/flame.svg"); } .pg-ico-robot { --ico: url("../img/programs/icons/robot.svg"); }
.pg-ico-chip { --ico: url("../img/programs/icons/chip.svg"); }
.pg-electives { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.pg-electives li { background: var(--acc-soft); border-radius: 999px; padding: .35rem .95rem; line-height: 1.5; }
.pg-extra { margin: 1rem 0 0; }
.pg-aside { margin: 1.2rem 0 0; padding: .8rem 1.1rem; border-left: 3px solid var(--acc); background: var(--acc-soft); border-radius: 0 12px 12px 0; }

/* 5. ways to study it, who it suits, jobs */
.pg-fit { padding: clamp(48px, 7vw, 96px) 0; background: var(--mist); }
.pg-tracks { list-style: none; margin: 0 0 clamp(36px, 5vw, 64px); padding: 0; display: grid; gap: 14px; }
@media (min-width: 760px) { .pg-tracks { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); } }
.pg-tracks li { display: grid; gap: .2rem; align-content: start; background: #fff; border-radius: 14px; padding: 1.1rem 1.25rem; border-top: 4px solid var(--acc); }
.pg-tracks b { font-size: 1.2rem; font-weight: 600; color: var(--acc); }
.pg-tracks small { color: var(--muted); font-size: .88rem; margin-top: .2rem; }
.pg-two { display: grid; gap: clamp(24px, 4vw, 64px); }
@media (min-width: 760px) { .pg-two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pg-list { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .55rem; }
.pg-list li { position: relative; padding-left: 2rem; font-size: 1.05rem; line-height: 1.55; }
.pg-list li::before { content: ""; position: absolute; left: 0; top: .2em; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--acc); }
.pg-list li::after { content: ""; position: absolute; left: .42rem; top: .45em; width: .38rem; height: .62rem; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* 6. photos: a strip that scrolls sideways */
.pg-life { padding: clamp(48px, 7vw, 96px) 0; overflow: hidden; }
.pg-strip { list-style: none; margin: .6rem 0 0; padding: 0 var(--gutter) 14px; display: grid; grid-auto-flow: column; grid-auto-columns: min(80vw, 420px); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); overscroll-behavior-x: contain; }
@media (min-width: 1264px) { .pg-strip { padding-inline: calc((100vw - var(--wrap)) / 2 + var(--gutter)); scroll-padding-inline: calc((100vw - var(--wrap)) / 2 + var(--gutter)); } }
.pg-strip > li { scroll-snap-align: start; }
.pg-shot { display: grid; gap: .55rem; color: var(--ink); text-decoration: none; font-size: .95rem; line-height: 1.5; }
.pg-shot img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; background: var(--mist-2); }
a.pg-shot:hover { color: var(--ink); }
a.pg-shot:hover span { text-decoration: underline; text-underline-offset: .2em; }

/* 7. next */
.pg-next { padding: clamp(48px, 7vw, 96px) 0; border-top: 1px solid var(--line); }
.pg-docs { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.3rem; margin: 0 0 clamp(36px, 5vw, 56px); }
.pg-docs > span { color: var(--muted); }
.pg-docs a { display: inline-flex; align-items: center; gap: .35rem; font-weight: 500; padding: .25rem 0; }
.pg-others { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: 14px; }
@media (min-width: 760px) { .pg-others { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pg-other { display: grid; gap: .25rem; align-content: start; height: 100%; padding: 1.2rem 1.3rem; border-radius: 14px; text-decoration: none; color: #fff; background: var(--night);
  transition: transform .2s var(--ease); }
.pg-other:hover, .pg-other:focus-visible { color: #fff; transform: translateY(-3px); }
.pg-other .ab { font-size: 2rem; font-weight: 600; line-height: 1; color: transparent; -webkit-text-stroke: 1.2px var(--acc-hi); letter-spacing: .03em; }
.pg-other b { font-weight: 500; font-size: 1.08rem; line-height: 1.4; }
.pg-other span:last-child { color: rgba(255, 255, 255, .75); font-size: .93rem; }
.pg-other.is-hub { background: var(--mist); color: var(--ink); align-content: center; }
.pg-other.is-hub:hover { color: var(--ink); }
.pg-other.is-hub span:last-child { color: var(--muted); }
.pg-apply { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1rem; margin-top: clamp(36px, 5vw, 56px); padding-top: 1.5rem; border-top: 1px solid var(--line); }
.pg-apply p { margin: 0 auto 0 0; flex: 1 1 22rem; }

/* ================================================================ graduate programmes (templates/public/grad.html) */
/* the plans: what the credits are made of, as a bar */
.gp-plans { list-style: none; margin: 1.2rem 0 0; padding: 0; display: grid; gap: clamp(14px, 2vw, 22px); }
@media (min-width: 760px) { .gp-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gp-plan { border: 1px solid var(--line); border-top: 4px solid var(--acc); border-radius: 14px; padding: 1.3rem 1.4rem 1.4rem; background: #fff; }
.gp-plan-name { margin: 0; font-size: 1.3rem; font-weight: 600; color: var(--acc); }
.gp-plan-lead { margin: .2rem 0 0; font-size: 1.05rem; }
.gp-plan-total { margin: .9rem 0 .5rem; color: var(--muted); }
.gp-plan-total b { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 600; color: var(--ink); margin-right: .2rem; line-height: 1; }
.gp-bar { display: flex; gap: 3px; height: 44px; border-radius: 10px; overflow: hidden; }
.gp-bar .seg { display: flex; align-items: center; gap: .35rem; padding: 0 .8rem; min-width: 0; white-space: nowrap; overflow: hidden; color: #fff; font-weight: 600; font-size: .92rem;
  background: var(--acc); transform-origin: left; }
.gp-bar .seg em { font-style: normal; font-weight: 400; }
/* the same two colours everywhere on these pages: coursework light, thesis dark, both in the programme's colour */
.gp-bar .seg-course, .k-course { background: var(--acc-hi); color: var(--night); }
.gp-bar .seg-thesis, .k-thesis { background: var(--acc); }
@media (prefers-reduced-motion: no-preference) { .gp-bar .seg { animation: gp-grow .9s var(--ease) both; } .gp-bar .seg + .seg { animation-delay: .15s; } }
@keyframes gp-grow { from { transform: scaleX(0); } }
.gp-plan-note { margin: .8rem 0 0; color: var(--muted); font-size: .95rem; }

/* semester by semester: a row per year on a line down the left, a bar per term as long as its credits (the plan's
   heaviest term fills it), the courses taken without credit as dashed tags */
.gp-sem-panels { grid-template-columns: 1fr !important; }
.pg-tabs.is-tabs .gp-sem-panel h3 { display: none; }        /* the tab already says which plan it is */
.gp-key { display: flex; flex-wrap: wrap; gap: .3rem 1.3rem; margin: 0 0 1.2rem; color: var(--muted); font-size: .9rem; }
.gp-key span { display: inline-flex; align-items: center; gap: .45rem; }
.gp-key i, .gp-did li::before { flex: none; display: block; width: .75rem; height: .75rem; border-radius: 3px; }
.gp-key .k-nc { border: 1.5px dashed #8a979e; }
.gp-years { list-style: none; margin: 0; padding: 0; }
.gp-yr { position: relative; display: grid; gap: .6rem; padding: 0 0 1.5rem 1.7rem; }
.gp-yr:last-child { padding-bottom: 0; }
.gp-yr::before { content: ""; position: absolute; left: calc(.4rem - 1px); top: .9rem; bottom: -.3rem; width: 2px; background: var(--acc); opacity: .25; }
.gp-yr:last-child::before { display: none; }
.gp-yr::after { content: ""; position: absolute; left: 0; top: .4rem; width: .8rem; height: .8rem; border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 4px var(--acc-soft); }
.gp-yr-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .3rem 1rem; }
.gp-yr-name { margin: 0; font-size: 1.15rem; font-weight: 600; line-height: 1.4; color: var(--acc); }
.gp-yr-sofar { margin: 0; display: grid; gap: .3rem; width: 9rem; text-align: right; color: var(--muted); font-size: .86rem; line-height: 1.3; font-variant-numeric: tabular-nums; }
.gp-yr-sofar .track { display: block; height: 5px; border-radius: 3px; background: rgba(13, 38, 48, .1); overflow: hidden; }
.gp-yr-sofar .track i { display: block; height: 100%; background: var(--acc); border-radius: 3px; }
.gp-terms { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 560px) { .gp-terms { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) {
  .gp-yr { grid-template-columns: 9.5rem minmax(0, 1fr); column-gap: 1.3rem; }
  .gp-yr-head { display: grid; justify-content: normal; align-content: start; gap: .5rem; }
  .gp-yr-sofar { width: auto; text-align: left; }
}
.gp-term { display: grid; align-content: start; gap: .6rem; background: #fff; border-radius: 12px; padding: .9rem 1.05rem 1rem; }
.gp-sem-when { margin: 0; display: flex; align-items: baseline; gap: .35rem; }
.gp-sem-when span { margin-right: auto; font-weight: 600; }
.gp-sem-when b { font-size: 1.55rem; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.gp-sem-when small { font-size: .85rem; color: var(--muted); }
.gp-load { margin: 0; height: 12px; border-radius: 6px; background: rgba(13, 38, 48, .07); }
.gp-load > i { display: flex; gap: 2px; height: 100%; border-radius: 6px; overflow: hidden; transform-origin: left; }
@media (prefers-reduced-motion: no-preference) { .gp-load > i { animation: gp-grow .8s var(--ease) both; } }
.pg-panel .gp-did, .pg-tabs.is-tabs .pg-panel .gp-did { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; grid-template-columns: 1fr; }
.gp-did li { display: flex; align-items: baseline; gap: .55rem; font-size: .93rem; line-height: 1.45; }
.gp-did li::before { content: ""; transform: translateY(.08em); }
.gp-did .is-course::before { background: var(--acc-hi); }
.gp-did .is-thesis::before { background: var(--acc); }
.gp-did b { margin-left: auto; padding-left: .5rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.pg-panel .gp-nc, .pg-tabs.is-tabs .pg-panel .gp-nc { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.gp-nc li { border: 1.5px dashed #8a979e; border-radius: 6px; padding: .05rem .5rem; color: var(--muted); font-size: .85rem; line-height: 1.5; }

/* ================================================================ the hub */
.hub-hero { padding: clamp(22px, 3.5vw, 40px) 0 clamp(48px, 7vw, 88px); }
.hub-title { margin: 0; line-height: 1.15; }
.hub-title .t { display: block; font-size: clamp(2.3rem, 5.4vw, 4.1rem); font-weight: 600; letter-spacing: -.01em; }
.hub-title .c { display: block; margin-top: .35rem; font-size: clamp(1.25rem, 2.6vw, 2rem); font-weight: 300; color: rgba(255, 255, 255, .86); }
.hub-lead { max-width: 44rem; margin: 1.1rem 0 0; color: rgba(255, 255, 255, .8); }
.hub-line { list-style: none; margin: clamp(28px, 4vw, 48px) 0 0; padding: 0; display: grid; gap: clamp(14px, 2vw, 24px); }
@media (min-width: 860px) { .hub-line { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.hub-card { display: flex; flex-direction: column; height: 100%; color: #fff; text-decoration: none; background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(143, 208, 212, .18); border-radius: 18px; overflow: hidden; transition: transform .25s var(--ease), border-color .25s; }
.hub-card:hover, .hub-card:focus-visible { color: #fff; transform: translateY(-4px); border-color: var(--acc-hi); }
.hub-card .ph { display: block; aspect-ratio: 1; overflow: hidden; background: #123845; }
.hub-card .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.hub-card:hover .ph img { transform: scale(1.03); }
.hub-card .ph.is-me img { object-position: 0 50%; } .hub-card .ph.is-dmrie img { object-position: 100% 50%; } .hub-card .ph.is-emme img { object-position: 0 100%; }
.hub-card .nm { margin: 1.1rem 1.25rem 0; font-size: 1.2rem; font-weight: 500; line-height: 1.4; }
.hub-card .hl { margin: .3rem 1.25rem 0; color: rgba(255, 255, 255, .78); line-height: 1.5; }
.hub-card .spec { display: flex; gap: 1.4rem; margin: .9rem 1.25rem 0; color: rgba(255, 255, 255, .75); font-size: .92rem; }
.hub-card .spec em { font-style: normal; font-size: 1.6rem; font-weight: 600; color: #fff; margin-right: .15rem; }
.hub-card .chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: .8rem 1.25rem 0; }
.hub-card .chips span { border: 1px solid var(--acc-hi); color: var(--acc-hi); border-radius: 999px; padding: 0 .6rem; font-size: .84rem; line-height: 1.7; }
.hub-card .go { margin: auto 1.25rem 1.25rem; padding-top: 1.1rem; font-weight: 500; color: var(--acc-hi); }
.hub-card:hover .go { text-decoration: underline; text-underline-offset: .25em; }

/* the quiz button (public/quiz.html) */
.hub-quiz { background: var(--mist); border-bottom: 1px solid var(--line); padding: clamp(36px, 5vw, 60px) 0; }
.hub-quiz-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.hub-quiz-in p { margin: 0; color: var(--slate-deep); max-width: 40rem; }
.hub-quiz .btn { padding: .8rem 1.5rem; font-size: 1.05rem; }

.hub-compare { padding: clamp(48px, 7vw, 96px) 0; }
.hub-compare .pg-note:last-child { margin-bottom: 0; }
/* two white sections in a row: one gap between them, not both paddings (those are sized for where the colour changes) */
.hub-compare:has(+ .pg-life), .pg-choice:has(+ .pg-choice), .pg-choice:has(+ .pg-life), .pg-life:has(+ .pg-next) { padding-bottom: clamp(28px, 4vw, 48px); }
.hub-compare + .pg-life, .pg-choice + .pg-choice, .pg-choice + .pg-life, .pg-life + .pg-next { padding-top: clamp(28px, 4vw, 48px); }
.hub-table { width: 100%; border-collapse: collapse; font-size: .97rem; line-height: 1.5; margin-top: 1rem; }
.hub-table th, .hub-table td { padding: .8rem .9rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.hub-table thead th { border-bottom: 0; padding-bottom: 1rem; }
.hub-table thead th a { display: grid; gap: .2rem; color: var(--ink); text-decoration: none; font-weight: 500; }
.hub-table thead th a span { font-size: 1.9rem; font-weight: 600; line-height: 1; color: var(--acc); }
.hub-table thead th a:hover { color: var(--acc); }
.hub-table tbody th { font-weight: 500; color: var(--muted); width: 16%; }
@media (max-width: 760px) {
  .hub-table thead { display: none; }
  .hub-table, .hub-table tbody, .hub-table tr, .hub-table th, .hub-table td { display: block; width: auto; }
  .hub-table tbody th { width: auto; padding-bottom: .2rem; border-bottom: 0; color: var(--ink); }
  .hub-table td { display: grid; grid-template-columns: minmax(0, 9.5rem) minmax(0, 1fr); gap: .6rem; padding-top: .3rem; padding-bottom: .3rem; border-bottom: 0; }
  .hub-table td::before { content: attr(data-label); color: var(--muted); font-size: .88rem; }
  .hub-table tr { border-bottom: 1px solid var(--line); padding-bottom: .5rem; }
}
.hub-more { padding: clamp(40px, 6vw, 72px) 0; border-top: 1px solid var(--line); }
.hub-more .prose { max-width: 52rem; }
.hub-next { background: var(--mist); padding: clamp(48px, 7vw, 96px) 0; }
.hub-next-in { display: grid; gap: clamp(20px, 4vw, 48px); align-items: center; }
@media (min-width: 860px) { .hub-next-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.hub-next figure { margin: 0; }
.hub-next img { width: 100%; border-radius: 14px; }
.hub-next p { max-width: 34rem; }

@media (prefers-reduced-motion: reduce) {
  .hub-card, .hub-card .ph img, .pg-other { transition: none; }
  .bp .bp-spin, .bp .bp-flow, .bp .bp-belt, .bp .bp-swing { animation: none !important; }
}
