:root {
  font: 16px "Open Sans", Arial, sans-serif;
  color: #171b20;
  background: #fff;
  --red: #da292b;
  --hover: #b91f25;
  --ink: #171b20;
  --muted: #534f4d;
  --line: #e7dfd7;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
.masthead, footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.2rem;
  padding: 1.25rem max(5vw, 1rem);
}
.masthead { background: #fafafa; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; }
.brand img { width: clamp(120px, 12vw, 165px); height: auto; display: block; }
.brand span { border-left: 1px solid #bbb1aa; padding-left: .8rem; font-weight: 700; }
nav, .footer-links { display: flex; flex-wrap: wrap; gap: .25rem 1.2rem; }
nav a, .portal-link { padding: .4rem 0; text-decoration: none; font-weight: 600; font-size: .92rem; }
nav a[aria-current], nav a:hover, .portal-link:hover { color: var(--hover); }
.portal-link { border: 1px solid #a49a91; padding: .65rem .9rem; border-radius: 6px; }
.portal-link span, .button span { margin-left: .5rem; }
main { width: min(1220px, 90vw); margin: clamp(2.1rem, 5vw, 4.8rem) auto; min-height: 61vh; }
.intro > p:not(.eyebrow) { max-width: 36ch; font-size: clamp(1.05rem, 1.45vw, 1.25rem); margin: 1.4rem 0 1.75rem; color: var(--muted); }
.eyebrow { font-size: .74rem; font-weight: 700; letter-spacing: .095em; color: var(--hover); }
h1, h2, h3 { text-wrap: balance; }
p { line-height: 1.55; }
.button, button {
  display: inline-block; padding: .85rem 1.15rem; background: var(--red); color: #fff;
  border: 0; border-radius: 6px; text-decoration: none; font: inherit; font-weight: 700; cursor: pointer;
}
.button:hover, button:hover { background: var(--hover); }
.flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1.65rem 0; }
.panel, article { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: clamp(1.12rem, 2.1vw, 1.8rem); margin-bottom: 1rem; }
.panel { max-width: 760px; margin-top: 1.5rem; }
article h3, .panel h3 { margin: 0; }
article p:last-child { margin-bottom: 0; }
details + details { border-top: 1px solid var(--line); margin-top: .9rem; padding-top: .9rem; }
summary { font-weight: 700; cursor: pointer; }
label { display: block; margin-bottom: 1rem; font-weight: 600; }
input:not([type=checkbox]), textarea, select { display: block; width: 100%; margin-top: .45rem; border: 1px solid #93877e; border-radius: 5px; padding: .65rem; font: inherit; background: #fff; color: var(--ink); }
textarea { min-height: 7rem; resize: vertical; }
footer { border-top: 1px solid var(--line); font-size: .87rem; color: var(--muted); }
:focus-visible { outline: 3px solid var(--hover); outline-offset: 4px; }
.project { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 780px) {
  .flow { grid-template-columns: 1fr; }
  .masthead { gap: .7rem; }
  .masthead nav { order: 3; width: 100%; }
  .portal-link { padding: .5rem .6rem; }
}

@font-face {
  font-family: "Open Sans";
  src: url("fonts/OpenSans-Regular.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Open Sans";
  src: url("fonts/OpenSans-Semibold.woff") format("woff");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Open Sans";
  src: url("fonts/OpenSans-Bold.woff") format("woff");
  font-weight: 700;
  font-display: swap;
}
.masthead { border-top: 4px solid var(--red); padding-inline: max(5vw, calc((100% - 1220px) / 2)); }
nav a[aria-current] { text-decoration: underline; text-underline-offset: .35em; }
h1 { font-weight: 600; font-size: clamp(1.9rem, 3.25vw, 3rem); letter-spacing: -.025em; line-height: 1.2; margin: .2em 0; }
h2 { font-weight: 600; font-size: clamp(1.35rem, 2.2vw, 2rem); letter-spacing: -.018em; line-height: 1.28; margin: .25em 0; }
main:has(#catalogue:not([hidden])) { width: 100%; margin-top: 0; }
.content-width { width: min(1220px, 90vw); margin-inline: auto; }
.academy-title { background: #faf8f5; border-bottom: 1px solid var(--line); }
.academy-title .content-width { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; column-gap: 1.5rem; row-gap: .6rem; padding-block: clamp(1.1rem, 2.3vw, 1.85rem); }
.academy-title h1 { margin: 0; }
.academy-title a, .featured-programme a { color: var(--hover); text-underline-offset: .25em; font-weight: 700; }
.academy-banner { display: block; width: 100%; height: clamp(290px, 31vw, 550px); object-fit: cover; object-position: center 48%; }
.academy-overview { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: clamp(1.8rem, 6vw, 6rem); align-items: start; padding-top: clamp(1.8rem, 4vw, 3.75rem); }
.academy-overview h2 { margin-top: 0; }
.academy-overview .intro p { max-width: 54ch; margin: .9rem 0 0; line-height: 1.7; }
.featured-programme { padding: 1.3rem 1.5rem; background: #faf8f5; border-top: 3px solid var(--red); }
.featured-programme .eyebrow { margin-top: 0; }
footer { background: #faf8f5; }
@media (max-width: 700px) {
  .academy-overview { grid-template-columns: 1fr; }
  .academy-banner { height: clamp(220px, 58vw, 350px); }
}

.course-layout { display: grid; grid-template-columns: minmax(200px, 270px) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.course-sidebar nav { display: grid; gap: .25rem; }
.course-sidebar nav a { padding: .55rem .65rem; border-radius: 5px; }
.course-sidebar nav a[aria-current] { color: var(--hover); background: #faf1ee; }
.course-body > .panel { max-width: none; }
.course-body ul { line-height: 1.65; }
.project-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; }
.project-section + .project-section { margin-top: 1.1rem; }
.project-section p { margin-top: .3rem; }
@media (max-width: 700px) {
  .course-layout { grid-template-columns: 1fr; gap: 0; }
  .course-sidebar { margin-bottom: 0; }
}
