/* ==========================================================================
   Bedrock College of Nursing - public stylesheet.

   The four brand colours are injected as custom properties by the settings
   screen, so changing a colour in the dashboard restyles the whole site. Every
   other value here is derived from them.
   ========================================================================== */

:root {
    /* Fallbacks. The dashboard overrides these four in an inline <style>. */
    --ink: #1b2624;
    --teal: #0e4f4a;
    --accent: #d06b4f;
    --paper: #f4f1ea;
    --teal-deep: #082b28;
    --teal-soft: #e4eeec;
    --accent-soft: #f7e6e0;
    /* The accent, dark enough to read at small sizes. */
    --accent-ink: #a6563f;

    --white: #ffffff;
    --line: rgba(27, 38, 36, .14);
    --line-soft: rgba(27, 38, 36, .08);
    --muted: rgba(27, 38, 36, .66);
    --muted-light: rgba(255, 255, 255, .74);

    --serif: "Newsreader", Georgia, "Times New Roman", serif;
    --sans: "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

    --wrap: 1180px;
    --gutter: 24px;
    --radius: 4px;
    --radius-lg: 10px;
    --shadow: 0 18px 40px -28px rgba(8, 43, 40, .5);
    --shadow-lg: 0 30px 70px -40px rgba(8, 43, 40, .65);
}

/* --------------------------------------------------------------------------
   Reset and base
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--white);
    color: var(--ink);
    font: 400 17px/1.65 var(--sans);
    -webkit-font-smoothing: antialiased;
}

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

/* A reference number or an email address wraps rather than widening the page. */
p, li, dd, dt, td, th, h1, h2, h3, h4, address, blockquote, figcaption { overflow-wrap: break-word; }

a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-ink); }

h1, h2, h3, h4 {
    font-family: var(--serif);
    font-weight: 500;
    line-height: 1.16;
    letter-spacing: -.012em;
    margin: 0 0 .5em;
}

p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .88em;
    background: var(--teal-soft);
    padding: .12em .4em;
    border-radius: 3px;
}

hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

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

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    /* The darkened accent: the pale one cannot carry white lettering, and
       this is the first thing somebody using a keyboard meets. */
    background: var(--accent-ink);
    color: var(--white);
    padding: .75rem 1.25rem;
    font-weight: 700;
}
.skip-link:focus { left: 0; }

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Shared pieces
   -------------------------------------------------------------------------- */

.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section--paper { background: var(--paper); }

.section-head { max-width: 46rem; margin-bottom: 2.75rem; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head__title { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: .55rem; }
.section-head__lead { color: var(--muted); margin: 0; font-size: 1.05rem; }
.section__more { margin: 2.5rem 0 0; }

.eyebrow {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin: 0 0 1rem;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--teal);
}
.eyebrow--light { color: rgba(255, 255, 255, .8); }

/* The pulse trace: a small ECG mark that runs through the whole site. */
.eyebrow__mark {
    flex: 0 0 34px;
    height: 10px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 34px 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 10'%3E%3Cpath d='M0 5h8l2-4 3 8 3-6 2 2h16' fill='none' stroke='%23d06b4f' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-weight: 700;
    font-size: .95rem;
    color: var(--teal);
    text-decoration: none;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 2px;
}
.text-link:hover { color: var(--accent-ink); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .9rem 1.6rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: none;
    font: 700 .95rem/1 var(--sans);
    letter-spacing: .01em;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s ease, background-color .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn--accent { background: var(--accent-ink); color: var(--white); }
.btn--accent:hover { background: var(--ink); color: var(--white); }

.btn--outline { border-color: var(--teal); color: var(--teal); }
.btn--outline:hover { background: var(--teal); color: var(--white); }

.btn--outline-light { border-color: rgba(255, 255, 255, .5); color: var(--white); }
.btn--outline-light:hover { background: var(--white); color: var(--teal); }

.btn--quiet { background: rgba(255, 255, 255, .14); color: var(--white); border-color: rgba(255, 255, 255, .28); }
.btn--quiet:hover { background: var(--white); color: var(--teal); }

.btn--ghost { color: var(--muted); border-color: var(--line); }
.btn--ghost:hover { color: var(--ink); border-color: var(--ink); }

.btn--compact { padding: .62rem 1.1rem; font-size: .85rem; }
.btn--block { display: flex; width: 100%; }

.notice {
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--teal);
    background: var(--teal-soft);
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 1.5rem 0;
    font-size: .95rem;
}
.notice--success { border-color: #2f7d63; background: #e6f2ec; }
.notice--error { border-color: #b3402c; background: var(--accent-soft); }
.notice--warning { border-color: #c2871f; background: #fbf1dd; }
.flashes { padding-top: 1.75rem; }

.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.ticks--two { grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: .75rem 2rem; }
.ticks li {
    position: relative;
    padding-left: 1.9rem;
    color: var(--muted);
}
.ticks li::before {
    content: "";
    position: absolute;
    left: 0; top: .5em;
    width: 11px; height: 6px;
    border-left: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(-45deg);
}

.prose { font-size: 1.06rem; }
.prose > :last-child { margin-bottom: 0; }

.empty {
    text-align: center;
    padding: 4rem 1rem;
    border: 1px dashed var(--line);
    border-radius: var(--radius-lg);
    color: var(--muted);
}

.callout {
    margin: 2rem 0 0;
    padding: 1.5rem 1.75rem;
    background: var(--teal-soft);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--teal);
}
.callout__title { font-size: 1.1rem; margin-bottom: .35rem; }
.callout p { margin: 0; color: var(--muted); }

.crumbs {
    border-bottom: 1px solid var(--line-soft);
    font-size: .88rem;
    color: var(--muted);
}
.crumbs .wrap { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding-top: 1rem; padding-bottom: 1rem; }
.crumbs a { text-decoration: none; }
.crumbs__sep { opacity: .4; }
.crumbs__here { color: var(--ink); }

/* A row of label / value pairs, joined by a dotted leader. */
.ledger { margin: 0; }
.ledger__row {
    display: flex;
    align-items: baseline;
    gap: .6rem;
    padding: .7rem 0;
    border-bottom: 1px solid var(--line-soft);
}
.ledger__row:last-child { border-bottom: 0; }
.ledger__label { margin: 0; font-size: .92rem; flex: 0 1 auto; }
.ledger__label small { display: block; font-size: .78rem; color: var(--muted); }
.ledger__leader { flex: 1 1 auto; border-bottom: 1px dotted var(--line); transform: translateY(-3px); }
/* Amounts stay on one line; a long value such as a timetable wraps. */
.ledger__value { margin: 0; font-weight: 700; text-align: right; max-width: 60%; }

.steps { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1.25rem; }
.steps li { display: flex; gap: 1.1rem; align-items: flex-start; }
.steps li > span {
    flex: 0 0 2.2rem;
    height: 2.2rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--teal);
    color: var(--white);
    font-weight: 700;
    font-size: .95rem;
}
.steps strong { display: block; font-size: 1.05rem; }
.steps p { margin: .15rem 0 0; color: var(--muted); font-size: .96rem; }
.steps--compact li > span { background: var(--accent); }

/* --------------------------------------------------------------------------
   Header and navigation
   -------------------------------------------------------------------------- */

.topbar {
    background: var(--teal-deep);
    color: var(--muted-light);
    font-size: .82rem;
}
.topbar__inner {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.5rem;
    justify-content: space-between;
    padding-top: .6rem;
    padding-bottom: .6rem;
}
.topbar p { margin: 0; }
.topbar a { color: var(--white); text-decoration: none; }
.topbar a:hover { color: var(--accent); }
/*
 * Spaced rather than divided.
 *
 * A slash between two items has to belong to one of them, and whichever
 * one it is, it dangles when the strip wraps: at the head of the new line
 * or at the tail of the old one. The college can also change its own
 * telephone number and address, so there is no width at which the strip
 * is reliably one line. A gap divides them at every width and cannot be
 * left behind by a line break.
 */
.topbar__contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .1rem 1.15rem;
}

/* The way into the portals, on every page of the public site. */
.topbar__portal { font-weight: 700; }
.topbar__portal::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: .35rem;
    vertical-align: -1px;
    border: 1.5px solid currentColor;
    border-radius: 3px 3px 0 0;
    border-bottom-width: 4px;
}

.nav-actions { display: flex; align-items: center; gap: .9rem; }

.nav-signin {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-size: .9rem;
    font-weight: 700;
    color: var(--teal);
    text-decoration: none;
    white-space: nowrap;
}
.nav-signin:hover { color: var(--accent-ink); }
.nav-signin__icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid currentColor;
    position: relative;
}
.nav-signin__icon::before {
    content: "";
    position: absolute;
    left: 50%; top: 4px;
    width: 7px; height: 7px;
    margin-left: -3.5px;
    border-radius: 50%;
    border: 1.5px solid currentColor;
}
.nav-signin__icon::after {
    content: "";
    position: absolute;
    left: 50%; bottom: 2px;
    width: 13px; height: 7px;
    margin-left: -6.5px;
    border-radius: 7px 7px 0 0;
    border: 1.5px solid currentColor;
    border-bottom: 0;
}

.masthead {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--white);
    border-bottom: 1px solid var(--line-soft);
}
.masthead.is-stuck { box-shadow: var(--shadow); }
/*
 * The bar gives way before it overflows.
 *
 * These three gaps used to be fixed, which meant the row had no answer to
 * being too wide except to hang off the end of its own container - and it
 * was closer to that than it looked. Measured across the five designs, the
 * name, the seven menu items and the three buttons came within 7px of the
 * edge on one and 14px past it on another, purely because the designs set
 * different wrap widths. A longer college name or one more menu item would
 * have broken most of them.
 *
 * Tightening the three gaps by a quarter-rem each buys the row about 27px,
 * which clears the worst of them with room over.
 *
 * Deliberately not viewport-driven. A clamp on vw was tried and is wrong:
 * the wrap caps the row's width, so past that point a wider window gives
 * the bar no more room to fit in while a vw gap happily grows - which put
 * the overflow back at 1920 after it had gone at 1280. The pressure comes
 * from the content against a fixed wrap, and neither of those is a
 * function of the window.
 */
.masthead__inner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-height: 76px;
}

/*
 * The brand keeps its full width while the nav is a row; it is the nav that
 * gives way, not the college's name. Below the breakpoint, where the nav is
 * a drawer and the only competition is the menu button, it may shrink - see
 * the rule further down that lets it.
 */
.brand { flex: 0 0 auto; }
.brand__text { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: inherit; }
.brand__mark {
    flex: 0 0 42px;
    height: 42px;
    display: grid;
    place-items: center;
    background: var(--teal);
    color: var(--white);
    font-family: var(--serif);
    font-size: 1.3rem;
    border-radius: 3px;
}
.brand__names { display: flex; flex-direction: column; }
.brand__name {
    font-family: var(--serif);
    font-size: 1.16rem;
    line-height: 1.15;
    white-space: nowrap;
}
.brand__name--light { color: var(--white); font-size: 1.3rem; }
.brand__tag {
    font-size: .72rem;
    color: var(--muted);
    letter-spacing: .04em;
    /*
     * The tagline is longer than the name it sits under, and because the two
     * are stacked it was the tagline that set the width of the brand - and so
     * how much was left for the nav. Capped to roughly the name's own width,
     * it reads as a strapline rather than a second headline.
     */
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-toggle {
    display: none;
    margin-left: auto;
    background: none;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: .6rem .7rem;
    cursor: pointer;
}
.nav-toggle__bars { display: grid; gap: 4px; }
.nav-toggle__bars i { display: block; width: 20px; height: 2px; background: var(--ink); }

.primary-nav { margin-left: auto; display: flex; align-items: center; gap: 1.25rem; }

.menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: .8rem;
    margin: 0;
    padding: 0;
}
.menu > li { position: relative; }
.menu > li > a {
    text-decoration: none;
    color: var(--ink);
    font-size: .95rem;
    font-weight: 600;
    padding: 1.4rem 0;
    display: block;
    white-space: nowrap;
}
.menu > li > a:hover, .menu > li.is-current > a { color: var(--accent-ink); }
.menu > li.is-current > a { box-shadow: inset 0 -3px 0 var(--accent); }

.sub-menu {
    position: absolute;
    top: 100%;
    left: -1rem;
    min-width: 15rem;
    list-style: none;
    margin: 0;
    padding: .5rem 0;
    background: var(--white);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .15s ease, transform .15s ease;
    z-index: 5;
}
.menu > li:hover > .sub-menu,
.menu > li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: none;
}
.sub-menu a {
    display: block;
    padding: .55rem 1rem;
    font-size: .92rem;
    text-decoration: none;
    color: var(--ink);
}
.sub-menu a:hover { background: var(--teal-soft); color: var(--teal); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

/*
 * The lettering follows the colour behind it rather than being white and
 * hoping. A college may choose a pale brand colour - some do - and white on
 * pale grey is a headline nobody can read.
 */
.hero {
    position: relative;
    background: var(--teal);
    color: var(--on-brand);
    overflow: hidden;
}
.hero__rules {
    position: absolute;
    inset: 0;
    opacity: .16;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, .5) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, .5) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 72%);
    -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 72%);
}
.hero__inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
    padding-top: clamp(3.5rem, 7vw, 6rem);
    padding-bottom: clamp(3.5rem, 7vw, 6rem);
}
.hero__title {
    font-size: clamp(2.4rem, 5.4vw, 4.05rem);
    margin-bottom: 1.1rem;
    max-width: 16ch;
}
.hero__title em { font-style: italic; color: var(--accent); }
.hero__lead {
    font-size: 1.14rem;
    color: rgba(255, 255, 255, .84);
    max-width: 40rem;
    margin-bottom: 2rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-bottom: 2.25rem; }
.hero__trust {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: .6rem 1.75rem;
    margin: 0;
    padding: 0;
    font-size: .88rem;
    color: rgba(255, 255, 255, .76);
}
.hero__trust li { position: relative; padding-left: 1.1rem; }
.hero__trust li::before {
    content: "";
    position: absolute;
    left: 0; top: .62em;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.statement {
    background: var(--white);
    color: var(--ink);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-lg);
}
.statement__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding-bottom: .9rem;
    margin-bottom: .4rem;
    border-bottom: 2px solid var(--ink);
}
.statement__title { font-family: var(--serif); font-size: 1.18rem; }
.statement__stamp {
    font-size: .7rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
}
.statement__link {
    display: inline-block;
    margin-top: 1.1rem;
    font-size: .88rem;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 2px solid var(--accent);
}

/* --------------------------------------------------------------------------
   Figures
   -------------------------------------------------------------------------- */

.figures { background: var(--teal-deep); color: var(--white); }
.figures__grid {
    /*
     * Flex rather than grid: a grid leaves empty slots on a short last row,
     * and an empty slot here is a pale block where a figure should be. A
     * flex row has no slots - whatever is on the last line stretches to
     * fill it.
     */
    display: flex;
    flex-wrap: wrap;
    gap: 1px;
    background: rgba(255, 255, 255, .12);
    padding-top: 1px;
    padding-bottom: 1px;
}
.figure {
    flex: 1 1 11rem;
    background: var(--teal-deep);
    padding: 2rem 1.5rem;
    text-align: center;
}
.figure__value {
    display: block;
    font-family: var(--serif);
    font-size: clamp(1.9rem, 3.4vw, 2.6rem);
    line-height: 1;
    color: var(--accent);
}
.figure__label {
    display: block;
    margin-top: .5rem;
    font-size: .82rem;
    color: rgba(255, 255, 255, .72);
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.bcn-cards { display: grid; gap: 1.5rem; }
.bcn-cards--3 { grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); }

.bcn-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
}
.bcn-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.bcn-card__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--teal-soft); }
.bcn-card__media img { width: 100%; height: 100%; object-fit: cover; }
.bcn-card__body { padding: 1.5rem 1.5rem 1.25rem; flex: 1 1 auto; }
.bcn-card__eyebrow {
    margin: 0 0 .5rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent-ink);
}
.bcn-card__title { font-size: 1.28rem; margin-bottom: .55rem; }
.bcn-card__title a { text-decoration: none; color: inherit; }
.bcn-card__title a:hover { color: var(--accent-ink); }
.bcn-card__text { color: var(--muted); font-size: .96rem; margin-bottom: 1rem; }
.bcn-card__facts {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin: 0;
    padding: 0;
    font-size: .78rem;
}
.bcn-card__facts li {
    background: var(--teal-soft);
    color: var(--teal);
    border-radius: 999px;
    padding: .25rem .7rem;
}
.bcn-card__facts .is-closed { background: var(--accent-soft); color: #97361f; }
.bcn-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.5rem;
    border-top: 1px solid var(--line-soft);
    background: #fcfbf8;
}
.bcn-card__price small { display: block; font-size: .72rem; color: var(--muted); }
.bcn-card__price strong { font-size: 1.1rem; }

.bcn-card--person { text-align: left; }
.bcn-card__portrait {
    display: block;
    aspect-ratio: 4 / 3;
    background: var(--teal-soft);
    display: grid;
    place-items: center;
    overflow: hidden;
}
.bcn-card__portrait img { width: 100%; height: 100%; object-fit: cover; }
.bcn-initials {
    font-family: var(--serif);
    font-size: 3rem;
    color: var(--teal);
    opacity: .5;
}
.bcn-initials--lg { font-size: 5rem; }
.bcn-credentials { display: block; font-family: var(--sans); font-size: .78rem; color: var(--muted); font-weight: 600; }

.bcn-card--quote { padding: 1.75rem; margin: 0; }
.bcn-stars { color: var(--accent-ink); letter-spacing: .12em; margin: 0 0 .75rem; }
.bcn-card--quote blockquote { margin: 0 0 1.25rem; }
.bcn-card--quote blockquote p { font-family: var(--serif); font-size: 1.1rem; font-style: italic; margin: 0; }
.bcn-card--quote figcaption { display: flex; align-items: center; gap: .85rem; }
.bcn-card--quote figcaption small { display: block; font-size: .8rem; color: var(--muted); }
.bcn-quote__avatar { flex: 0 0 46px; height: 46px; border-radius: 50%; overflow: hidden; }
.bcn-quote__avatar img { width: 100%; height: 100%; object-fit: cover; }

.post-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
.post-card__media { display: block; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; margin-bottom: 1rem; }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.post-card__date { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .4rem; }
.post-card__title { font-size: 1.22rem; margin-bottom: .5rem; }
.post-card__title a { text-decoration: none; color: inherit; }
.post-card__title a:hover { color: var(--accent-ink); }
.post-card__excerpt { color: var(--muted); font-size: .95rem; margin-bottom: 1rem; }

/*
 * "Read on" sits on the floor of the card.
 *
 * Headlines run to one line or two, and the link used to follow whatever
 * was above it - so in a row of three, one card's link sat lower than its
 * neighbours' for no reason a reader could see. The cards are already
 * stretched to a common height, so there is a floor to sit on.
 *
 * align-self matters: a flex column stretches its children, which would
 * pull the underline all the way across the card.
 */
.post-card { display: flex; flex-direction: column; }
.post-card > .text-link { margin-top: auto; align-self: flex-start; }

/* The same for the route cards, which end in a call to action. */
.route { display: flex; flex-direction: column; }
.route__cta { margin-top: auto; align-self: flex-start; }

/* --------------------------------------------------------------------------
   Routes, principles, link cards
   -------------------------------------------------------------------------- */

.routes__grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.route {
    display: block;
    padding: 1.75rem;
    background: var(--white);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    transition: border-color .18s ease, transform .18s ease;
}
.route:hover { border-color: var(--accent); transform: translateY(-3px); color: inherit; }
.route__title { font-size: 1.18rem; margin-bottom: .4rem; }
.route__text { color: var(--muted); font-size: .94rem; margin-bottom: 1rem; }
.route__cta { font-size: .85rem; font-weight: 700; color: var(--teal); border-bottom: 2px solid var(--accent); padding-bottom: 2px; }

.principles { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.principle { padding: 1.75rem; background: var(--white); border-radius: var(--radius-lg); border: 1px solid var(--line-soft); }
.principle__num { font-family: var(--serif); font-size: 1.6rem; color: var(--accent-ink); }
.principle__title { font-size: 1.16rem; margin: .5rem 0 .4rem; }
.principle__text { color: var(--muted); font-size: .95rem; margin: 0; }

.link-cards { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.link-card {
    display: block;
    padding: 1.5rem;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    background: var(--white);
    text-decoration: none;
    color: inherit;
}
.link-card:hover { border-color: var(--accent); color: inherit; }
.link-card__title { font-size: 1.1rem; margin-bottom: .35rem; }
.link-card__text { color: var(--muted); font-size: .92rem; margin-bottom: .75rem; }
.link-card__cta { font-size: .82rem; font-weight: 700; color: var(--teal); }

/* --------------------------------------------------------------------------
   Call to action
   -------------------------------------------------------------------------- */

.cta-band { background: var(--ink); color: var(--white); }
.cta-band__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding-top: clamp(2.5rem, 5vw, 4rem);
    padding-bottom: clamp(2.5rem, 5vw, 4rem);
}
.cta-band__title { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: .35rem; }
.cta-band__lead { margin: 0; color: rgba(255, 255, 255, .74); max-width: 38rem; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* --------------------------------------------------------------------------
   Page banners
   -------------------------------------------------------------------------- */

.page-banner {
    background: var(--teal);
    color: var(--white);
    padding: clamp(2.75rem, 5.5vw, 4.5rem) 0;
}
.page-banner__title { font-size: clamp(2.1rem, 4.4vw, 3.2rem); margin-bottom: .6rem; }
.page-banner__lead { margin: 0; color: rgba(255, 255, 255, .8); max-width: 46rem; font-size: 1.06rem; }
.page-banner--programme .page-banner__lead { margin-bottom: 1.75rem; }

.programme__meta {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1px;
    margin: 1.75rem 0 0;
    padding: 0;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: var(--radius);
    overflow: hidden;
}
.programme__meta li {
    flex: 1 1 10rem;
    background: var(--teal);
    padding: .9rem 1.1rem;
}
.programme__meta span {
    display: block;
    font-size: .7rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .62);
    margin-bottom: .2rem;
}
.programme__meta strong { font-size: .98rem; }

/* --------------------------------------------------------------------------
   Catalogue
   -------------------------------------------------------------------------- */

.filters { display: grid; gap: 1rem; margin-bottom: 2rem; }
.filters__group { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.filters__label {
    font-size: .74rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-right: .5rem;
}
.chip {
    display: inline-block;
    padding: .45rem 1rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: .86rem;
    text-decoration: none;
    color: var(--ink);
}
.chip:hover { border-color: var(--teal); color: var(--teal); }
.chip.is-on { background: var(--teal); border-color: var(--teal); color: var(--white); }

.catalogue__count { font-size: .86rem; color: var(--muted); margin-bottom: 1.25rem; }

/* --------------------------------------------------------------------------
   Programme page
   -------------------------------------------------------------------------- */

.programme__grid { display: grid; grid-template-columns: minmax(0, 1fr) 21rem; gap: 3rem; align-items: start; }
.programme__figure { margin: 0 0 2rem; border-radius: var(--radius-lg); overflow: hidden; }
.programme__block { margin-top: 2.75rem; }
.programme__h2 { font-size: 1.6rem; margin-bottom: 1rem; }
.programme__lead { color: var(--muted); margin: 0; }
.programme__note { margin-top: 1.25rem; font-size: .94rem; color: var(--muted); }

.syllabus { list-style: none; counter-reset: none; padding: 0; margin: 0; }
.syllabus__item { display: flex; gap: 1.1rem; padding: 1rem 0; border-bottom: 1px solid var(--line-soft); }
.syllabus__item:last-child { border-bottom: 0; }
.syllabus__num { font-family: var(--serif); font-size: 1.1rem; color: var(--accent-ink); flex: 0 0 2rem; }
.syllabus__title { font-size: 1.05rem; margin: 0 0 .2rem; }
.syllabus__note { margin: 0; color: var(--muted); font-size: .93rem; }

.programme__aside { position: sticky; top: 104px; }
.enrol {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.6rem;
    box-shadow: var(--shadow);
}
.enrol__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: .9rem;
    margin-bottom: .5rem;
    border-bottom: 2px solid var(--ink);
}
.enrol__title { font-family: var(--serif); font-size: 1.16rem; }
.enrol__note { font-size: .84rem; color: var(--muted); margin: .9rem 0 1.1rem; }
.enrol .btn { margin-top: 1.1rem; }
.enrol__brochure { display: inline-block; margin-top: 1rem; font-size: .86rem; }
.enrol__fine { margin: 1.1rem 0 0; font-size: .78rem; color: var(--muted); }

.tag {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: .28rem .7rem;
    border-radius: 999px;
}
.tag--open { background: #e2f1e9; color: #226b4f; }
.tag--closed { background: var(--accent-soft); color: #97361f; }

/* --------------------------------------------------------------------------
   Faculty profile
   -------------------------------------------------------------------------- */

.profile { display: grid; grid-template-columns: 19rem minmax(0, 1fr); gap: 3rem; align-items: start; }
.profile__portrait {
    aspect-ratio: 1;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--teal-soft);
    display: grid;
    place-items: center;
}
.profile__portrait img { width: 100%; height: 100%; object-fit: cover; }
.profile__facts { margin: 1.5rem 0 0; }
.profile__facts > div { padding: .7rem 0; border-bottom: 1px solid var(--line-soft); }
.profile__facts dt { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.profile__facts dd { margin: .2rem 0 0; font-weight: 600; }
.profile__links { display: grid; gap: .6rem; margin-top: 1.25rem; justify-items: start; }
.profile__name { font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin-bottom: 1.25rem; }
.profile__pending { color: var(--muted); font-style: italic; }
.profile__back { margin-top: 2rem; }

/* --------------------------------------------------------------------------
   Article
   -------------------------------------------------------------------------- */

.article__inner { max-width: 44rem; }
.article__head { margin-bottom: 2rem; }
.article__title { font-size: clamp(2rem, 4vw, 2.9rem); margin-bottom: .6rem; }
.article__date { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.article__lead { font-size: 1.16rem; color: var(--muted); margin-top: 1rem; }
.article__figure { margin: 0 0 2rem; border-radius: var(--radius-lg); overflow: hidden; }
.article__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
}

.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 3rem;
    font-size: .9rem;
}
.pager__link { font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--accent); padding-bottom: 2px; }
.pager__link.is-off { color: var(--muted); border-color: var(--line); }
.pager__count { color: var(--muted); }

/* --------------------------------------------------------------------------
   Editable pages
   -------------------------------------------------------------------------- */

.page__grid { display: grid; grid-template-columns: 16rem minmax(0, 1fr); gap: 3rem; align-items: start; }
.page__grid--wide { grid-template-columns: minmax(0, 1fr); max-width: 52rem; }
.page__main .prose { font-size: 1.08rem; }
.page__h2 { font-size: 1.6rem; margin: 2.5rem 0 1rem; }
.page__children { margin-top: 3rem; }

.section-nav { position: sticky; top: 104px; }
.section-nav__title {
    font-size: .74rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: .75rem;
}
.section-nav ul { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.section-nav li a {
    display: block;
    padding: .5rem 0 .5rem 1rem;
    margin-left: -2px;
    border-left: 2px solid transparent;
    font-size: .94rem;
    text-decoration: none;
    color: var(--muted);
}
.section-nav li a:hover { color: var(--teal); }
.section-nav li.is-current a { border-left-color: var(--accent); color: var(--ink); font-weight: 700; }

.dates { max-width: 44rem; }
.dates__card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
}
.dates__card .btn { margin-top: 1.5rem; }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.apply__grid { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 3rem; align-items: start; }
.contact__grid { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 3rem; align-items: start; }
.contact__h2 { font-size: 1.6rem; margin-bottom: .5rem; }
.contact__note { color: var(--muted); margin-bottom: 2rem; }

.bcn-form { max-width: 48rem; }
.bcn-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.bcn-fieldset { border: 0; margin: 0 0 2.5rem; padding: 0; }
.bcn-legend {
    display: flex;
    align-items: center;
    gap: .75rem;
    width: 100%;
    padding: 0 0 1rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--line);
    font-family: var(--serif);
    font-size: 1.32rem;
}
.bcn-step {
    flex: 0 0 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--teal);
    color: var(--white);
    font-family: var(--sans);
    font-size: .88rem;
    font-weight: 700;
}
.bcn-fieldset__note { color: var(--muted); font-size: .94rem; margin: -.5rem 0 1.25rem; }

.bcn-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.bcn-field--full { grid-column: 1 / -1; }
.bcn-field { display: flex; flex-direction: column; }

/* The field label is uppercase. A consent tick is a sentence, not a label,
   so it is excluded rather than left to fight the cascade. */
.bcn-field > label:not(.bcn-check),
.bcn-field > .bcn-label {
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: .4rem;
}
.bcn-req { color: var(--accent-ink); }

.bcn-field input[type="text"],
.bcn-field input[type="email"],
.bcn-field input[type="tel"],
.bcn-field input[type="number"],
.bcn-field input[type="date"],
.bcn-field input[type="url"],
.bcn-field select,
.bcn-field textarea {
    width: 100%;
    padding: .8rem .9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    font: 400 1rem/1.4 var(--sans);
    color: var(--ink);
}
.bcn-field textarea { resize: vertical; min-height: 6rem; }
.bcn-field input:focus, .bcn-field select:focus, .bcn-field textarea:focus {
    border-color: var(--teal);
    outline: 2px solid var(--teal-soft);
}
.bcn-field.has-error input,
.bcn-field.has-error select,
.bcn-field.has-error textarea { border-color: #b3402c; }

.bcn-help { font-size: .84rem; color: var(--muted); margin: .4rem 0 0; text-transform: none; letter-spacing: 0; }
.bcn-help--warning { color: #97361f; font-weight: 600; }
.bcn-error { font-size: .86rem; color: #b3402c; margin: .4rem 0 0; font-weight: 600; }

.bcn-alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.75rem;
    font-size: .95rem;
}
.bcn-alert p { margin: .25rem 0 0; }
.bcn-alert--error { background: var(--accent-soft); border-left: 4px solid #b3402c; }
.bcn-alert--notice { background: var(--teal-soft); border-left: 4px solid var(--teal); }

/* Fee options, rendered by the form's JavaScript. */
.bcn-fees { display: grid; gap: .75rem; }
.bcn-fees__empty { color: var(--muted); font-size: .92rem; margin: 0; font-style: italic; }
.bcn-fee {
    display: flex;
    gap: .9rem;
    align-items: flex-start;
    padding: 1rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0;
}
.bcn-fee:hover { border-color: var(--teal); }
.bcn-fee input { margin-top: .3rem; accent-color: var(--accent); }
.bcn-fee__body { flex: 1 1 auto; }
.bcn-fee__label {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .5rem;
    font-weight: 700;
    font-size: 1rem;
    color: var(--ink);
    text-transform: none;
    letter-spacing: 0;
}
.bcn-fee__amount { color: var(--teal); }
.bcn-fee__note {
    display: block;
    margin-top: .3rem;
    font-size: .86rem;
    font-weight: 400;
    color: var(--muted);
    text-transform: none;
    letter-spacing: 0;
}
.bcn-fee.is-on { border-color: var(--accent); background: #fffaf8; }

.bcn-consent { margin-bottom: 1.75rem; }
.bcn-check {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    font-size: .95rem;
    color: var(--ink);
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}
.bcn-check input { margin-top: .3rem; accent-color: var(--accent); }

.bcn-submit { border-top: 1px solid var(--line); padding-top: 1.75rem; }
.bcn-submit .bcn-help { margin-top: .75rem; }

.aside-card {
    background: var(--paper);
    border-radius: var(--radius-lg);
    padding: 1.6rem;
    margin-bottom: 1.25rem;
}
.aside-card__title { font-size: 1.1rem; margin-bottom: .75rem; }
.aside-card p { font-size: .94rem; color: var(--muted); }
.aside-card p:last-of-type { margin-bottom: 0; }
.aside-card__address { font-style: normal; display: grid; gap: .5rem; font-size: .94rem; }
.aside-card__hours { font-size: .88rem; color: var(--muted); margin-top: .75rem; }
.aside-card__contact { display: block; margin-top: .5rem; color: var(--white); font-weight: 700; }

/*
 * The dark one, stated after the pale one it varies. ".aside-card--ink p" and
 * ".aside-card p" are as particular as each other, so whichever is written
 * second wins - and while the dark card's rules came first, its paragraph was
 * taking the muted grey meant for the pale card and disappearing into the
 * navy.
 */
.aside-card--ink { background: var(--ink); color: var(--white); }
.aside-card--ink p,
.aside-card--ink .aside-card__hours { color: rgba(255, 255, 255, .82); }
.aside-card--ink .aside-card__title { color: var(--white); }
.aside-card .btn { margin-top: 1rem; }

.map { padding-bottom: clamp(3.5rem, 7vw, 6rem); }
.map__frame { border-radius: var(--radius-lg); overflow: hidden; line-height: 0; }
.map__frame iframe { width: 100%; min-height: 380px; border: 0; }

/* --------------------------------------------------------------------------
   Payment result
   -------------------------------------------------------------------------- */

.receipt__inner { max-width: 44rem; }
.receipt__card {
    border: 1px solid var(--line);
    border-top: 5px solid var(--teal);
    border-radius: var(--radius-lg);
    padding: clamp(1.75rem, 4vw, 2.75rem);
    box-shadow: var(--shadow);
}
.receipt__card--good { border-top-color: #2f7d63; }
.receipt__card--wait { border-top-color: #c2871f; }
.receipt__card--bad { border-top-color: #b3402c; }
.receipt__mark {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: .75rem;
}
.receipt__title { font-size: clamp(1.7rem, 3.4vw, 2.3rem); margin-bottom: .5rem; }
.receipt__lead { color: var(--muted); }
.receipt__detail { font-size: .94rem; }
.receipt .ledger { margin: 1.75rem 0; }
.receipt__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.receipt__next { margin-top: 3rem; }
.receipt__h2 { font-size: 1.4rem; }
.receipt__note { margin-top: 1.5rem; font-size: .9rem; color: var(--muted); }

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */

.miss__inner { max-width: 40rem; text-align: center; margin: 0 auto; padding: 3rem 0; }
.miss__code { font-family: var(--serif); font-size: 5rem; line-height: 1; color: var(--accent-ink); margin: 0; }
.miss__title { font-size: clamp(1.8rem, 3.4vw, 2.4rem); }
.miss__lead { color: var(--muted); margin-bottom: 2rem; }
.miss__actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
.miss__links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    justify-content: center;
    padding: 0;
    margin: 2.5rem 0 0;
    font-size: .9rem;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer { background: var(--brand-surface); color: var(--on-brand-soft); margin-top: auto; }
.site-footer__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
    gap: 2.5rem;
    padding-top: clamp(3rem, 6vw, 4.5rem);
    padding-bottom: 2.5rem;
}
.site-footer__tag { margin: .75rem 0 0; font-size: .95rem; }
.site-footer__accr { font-size: .84rem; color: rgba(255, 255, 255, .55); }
.site-footer__heading {
    font-family: var(--sans);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--white);
    margin-bottom: 1rem;
}
.footer-menu { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; font-size: .94rem; }
.site-footer a { color: rgba(255, 255, 255, .78); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer__address { font-style: normal; display: grid; gap: .5rem; font-size: .94rem; }
.site-footer__hours { color: rgba(255, 255, 255, .55); font-size: .88rem; }
.site-footer .btn--quiet { margin-top: 1rem; }
.social { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.25rem; font-size: .88rem; }
.site-footer__base {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1.5rem;
    padding-bottom: 2rem;
    border-top: 1px solid rgba(255, 255, 255, .12);
    font-size: .82rem;
}
.site-footer__base p { margin: 0; }
.site-footer__fineprint { color: rgba(255, 255, 255, .5); }

.site { display: flex; flex-direction: column; min-height: 100vh; }
.site-main { flex: 1 0 auto; }

/* --------------------------------------------------------------------------
   Attachments on the application form
   -------------------------------------------------------------------------- */

.bcn-file {
    width: 100%;
    padding: .7rem .8rem;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    background: #fcfbf8;
    font: 400 .92rem var(--sans);
    cursor: pointer;
}
.bcn-file:hover { border-color: var(--teal); }
.bcn-file::file-selector-button {
    margin-right: .8rem;
    padding: .45rem .9rem;
    border: 0;
    border-radius: var(--radius);
    background: var(--teal-soft);
    color: var(--teal);
    font: 700 .85rem var(--sans);
    cursor: pointer;
}

/* --------------------------------------------------------------------------
   A list of files, on the tracker and in the dashboard
   -------------------------------------------------------------------------- */

.doc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.doc-list__item {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: .8rem 1rem;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: var(--white);
}
.doc-list__type {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: var(--radius);
    background: var(--teal-soft);
    color: var(--teal);
    font: 700 .62rem/1 var(--sans);
    letter-spacing: .05em;
}
.doc-list__text { flex: 1 1 auto; min-width: 0; }
.doc-list__text strong { display: block; font-size: .95rem; }
.doc-list__text small {
    display: block;
    margin-top: .1rem;
    font-size: .78rem;
    color: var(--muted);
    overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   Tracking an application
   -------------------------------------------------------------------------- */

.status-lookup {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}
.status-lookup__aside {
    padding: 1.6rem;
    background: var(--paper);
    border-radius: var(--radius-lg);
}
.status-lookup__aside h2 { font-size: 1.15rem; margin-bottom: .6rem; }
.status-lookup__aside p { margin: 0 0 .8rem; font-size: .95rem; color: var(--muted); }
.status-lookup__fine { font-size: .84rem !important; }

.status-card {
    padding: clamp(1.5rem, 3vw, 2.25rem);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow);
}
.status-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--line-soft);
}
.status-card__ref {
    margin: 0;
    font-size: .74rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
}
.status-card__name { margin: .3rem 0 .1rem; font-size: 1.6rem; }
.status-card__programme { margin: 0; color: var(--muted); }
.status-card__action { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line-soft); }
.status-card__action .bcn-help { margin-top: .6rem; }

/* The stages an application passes through. */
.stages { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.stages__item {
    position: relative;
    display: flex;
    gap: 1rem;
    padding: 0 0 1.4rem 0;
}
.stages__item:last-child { padding-bottom: 0; }
.stages__marker {
    position: relative;
    flex: 0 0 auto;
    width: 1.1rem;
    height: 1.1rem;
    margin-top: .25rem;
    border-radius: 50%;
    border: 2px solid var(--line);
    background: var(--white);
}
/* The line joining one stage to the next. */
.stages__item:not(:last-child) .stages__marker::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    width: 2px;
    height: calc(1.4rem + .25rem);
    transform: translateX(-50%);
    background: var(--line);
}
.stages__item.is-done .stages__marker { background: var(--teal); border-color: var(--teal); }
.stages__item.is-done .stages__marker::after { background: var(--teal); }
.stages__item.is-current .stages__marker { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.stages__item.is-closed .stages__marker { background: var(--muted); border-color: var(--muted); }
.stages__text strong { display: block; font-size: 1.02rem; }
.stages__text small { display: block; margin-top: .15rem; color: var(--muted); font-size: .9rem; }
.stages__item.is-waiting .stages__text strong { color: var(--muted); }

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
    gap: 1.5rem;
    margin-top: 1.75rem;
}
.status-panel {
    padding: 1.5rem;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    background: var(--white);
}
.status-panel__title { font-size: 1.1rem; margin-bottom: 1rem; }
.status-panel__empty { margin: 0; color: var(--muted); font-size: .94rem; }

.status-history { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.status-history li { display: grid; gap: .15rem; font-size: .92rem; }
.status-history time { font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* --------------------------------------------------------------------------
   Search
   -------------------------------------------------------------------------- */

/*
 * Along a row there is not the width for a search box as well as six menu
 * items and three actions - measured, the box was what tipped the header into
 * squeezing the brand. So along a row it is the magnifier alone, and the box
 * itself appears in the drawer, where there is room for it.
 */
.nav-search { display: flex; align-items: center; }
.nav-search input {
    width: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    font: 400 .88rem var(--sans);
}
.nav-search button {
    display: grid;
    place-items: center;
    width: 2.2rem;
    height: 2.2rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--teal-soft);
    color: var(--teal);
    cursor: pointer;
}
.nav-search button:hover { background: var(--teal); color: var(--white); }
/* A magnifier drawn rather than fetched. */
.nav-search__icon {
    position: relative;
    display: block;
    width: 11px;
    height: 11px;
    border: 2px solid currentColor;
    border-radius: 50%;
}
.nav-search__icon::after {
    content: "";
    position: absolute;
    right: -5px;
    bottom: -4px;
    width: 7px;
    height: 2px;
    background: currentColor;
    transform: rotate(45deg);
}

.site-search { display: flex; gap: .6rem; margin-bottom: 2.5rem; }
.site-search input {
    flex: 1 1 auto;
    min-width: 0;
    padding: .9rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font: 400 1rem var(--sans);
}
.site-search input:focus { outline: 2px solid var(--teal); outline-offset: 1px; }

.search-hints p { color: var(--muted); margin-bottom: .8rem; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem; margin: 0; padding: 0; }

.results { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.results__link {
    display: block;
    padding: 1.1rem 1.25rem;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    background: var(--white);
    text-decoration: none;
    color: inherit;
}
.results__link:hover { border-color: var(--accent); }
.results__kind {
    display: inline-block;
    margin-bottom: .3rem;
    font-size: .68rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent-ink);
}
.results__title { display: block; font-family: var(--serif); font-size: 1.2rem; }
.results__note { display: block; margin-top: .3rem; color: var(--muted); font-size: .94rem; }

.results-empty { max-width: 34rem; }
.results-empty h2 { font-size: 1.4rem; margin-bottom: .6rem; }
.results-empty p { color: var(--muted); }

/* --------------------------------------------------------------------------
   How long is left to apply
   -------------------------------------------------------------------------- */

.countdown {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin: 0;
    font-size: .86rem;
}
.countdown strong { font-weight: 700; }

.countdown--card {
    margin: 0 0 .9rem;
    padding: .35rem .7rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: #8a3d25;
    font-size: .78rem;
}

.countdown--hero {
    margin: 1.5rem 0 0;
    padding: .55rem .95rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    color: var(--white);
}
.countdown__mark {
    width: .5rem;
    height: .5rem;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(208, 107, 79, .3);
}

/* --------------------------------------------------------------------------
   WhatsApp, on a phone
   -------------------------------------------------------------------------- */

.whatsapp-float {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 50;
    display: none;
    align-items: center;
    gap: .55rem;
    padding: .7rem 1.05rem;
    border-radius: 999px;
    background: #128c7e;
    color: #fff;
    font: 700 .88rem var(--sans);
    text-decoration: none;
    box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .5);
}
.whatsapp-float:hover { background: #0f7a6d; color: #fff; }
/* A handset, drawn. */
.whatsapp-float__icon {
    position: relative;
    width: 15px;
    height: 15px;
    border: 2px solid currentColor;
    border-radius: 50% 50% 50% 2px;
}
.whatsapp-float__icon::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 3px;
    width: 5px;
    height: 5px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
    /* Four footer columns are the first thing to run out of room. */
    .site-footer__grid { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
}

/* --------------------------------------------------------------------------
   Tablets

   A landscape tablet has the width for the page layouts this site was drawn
   with; it is only the type and the gutters that need easing. A portrait one
   does not, so that is where the columns actually stack.
   -------------------------------------------------------------------------- */

@media (min-width: 641px) and (max-width: 1180px) {
    /* A little more air at the edges than a phone needs. */
    :root { --gutter: 32px; }

    /* Display type set for a narrow desktop column reads as a stack of
       fragments once that column is the full width of the page. */
    .hero__title { max-width: 24ch; }
    .section-head { max-width: 42rem; }
    .page-banner__lead { max-width: 42rem; }

    /* Four facts across a tablet is four cramped facts. */
    .programme__meta li { flex: 1 1 calc(50% - 1px); }

    /* And four figures are a tidy square rather than a row of three
       and one stretched across the bottom. */
    .figure { flex: 1 1 calc(50% - 1px); }
}

@media (max-width: 900px) {
    /* Below this the second column really is too narrow to be worth keeping. */
    .programme__grid,
    .apply__grid,
    .contact__grid,
    .page__grid,
    .profile { grid-template-columns: minmax(0, 1fr); }

    .programme__aside, .section-nav { position: static; }
    .hero__inner { grid-template-columns: minmax(0, 1fr); }

    /* Once they are stacked, what the page is asking for - the fee, the
       phone number, the section list - should come before the long thing
       rather than three thousand pixels below it. */
    .apply__aside, .contact__aside { order: -1; }

    /* A sidebar that was a column is now a band across the top, so it should
       read as one rather than as a tall thin list. */
    .section-nav ul { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; border-left: 0; }
    .section-nav li a { border-left: 0; padding-left: 0; }
    .section-nav li.is-current a { box-shadow: inset 0 -2px 0 var(--accent); }
}

@media (max-width: 1180px) {
    .nav-toggle { display: block; }

    .primary-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--white);
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow);
        padding: .5rem 0 1.25rem;
    }
    .primary-nav.is-open { display: flex; }

    /* One row, always: here the brand is what gives way, because the only
       thing beside it is the menu button and that must never wrap below. */
    .masthead__inner { position: relative; flex-wrap: nowrap; gap: 1rem; }
    .brand { flex: 0 1 auto; min-width: 0; }
    .brand__text, .brand__names { min-width: 0; }
    .brand__name { overflow: hidden; text-overflow: ellipsis; }
    .brand__tag { max-width: 24rem; }
    .nav-toggle { flex: 0 0 auto; }
    .menu { flex-direction: column; align-items: stretch; gap: 0; }
    .menu > li > a { padding: .85rem var(--gutter); }
    .menu > li.is-current > a { box-shadow: inset 3px 0 0 var(--accent); }
    .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: 0;
        border-left: 2px solid var(--line);
        margin: 0 var(--gutter) .5rem;
        padding: 0;
    }
    .nav-actions {
        flex-direction: column;
        align-items: stretch;
        gap: .75rem;
        margin: .75rem var(--gutter) 0;
    }
    .nav-signin {
        justify-content: center;
        padding: .7rem 1rem;
        border: 1px solid var(--line);
        border-radius: var(--radius);
    }
    .nav-apply { margin: 0; }

    .topbar__inner { justify-content: flex-start; }
}

@media (max-width: 1180px) {
    /* In the drawer the box comes back, full width, with the button beside it. */
    .nav-search { width: 100%; }
    .nav-search input {
        position: static;
        flex: 1 1 auto;
        width: auto;
        opacity: 1;
        pointer-events: auto;
        padding: .6rem .8rem;
        border: 1px solid var(--line);
        border-right: 0;
        border-radius: var(--radius) 0 0 var(--radius);
    }
    .nav-search input:focus { outline: 2px solid var(--teal); outline-offset: 1px; }
    .nav-search button { height: auto; align-self: stretch; border-radius: 0 var(--radius) var(--radius) 0; }
}

@media (max-width: 640px) {
    /* Two columns of form field stop being two fields and start being two
       halves of a field, so this is where they go single file. */
    .bcn-grid { grid-template-columns: minmax(0, 1fr); }

    .status-lookup { grid-template-columns: minmax(0, 1fr); }
    .status-grid { grid-template-columns: minmax(0, 1fr); }
    .site-search { flex-wrap: wrap; }
    .site-search .btn { width: 100%; }

    /* The button is worth its space on a phone, and only on a phone. */
    .whatsapp-float { display: inline-flex; }

    /* Below this width two columns of anything are too narrow to read. */
    .site-footer__grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .site-footer__base { flex-direction: column; gap: .5rem; }
    .programme__meta li { flex: 1 1 100%; }
    .bcn-cards--3, .post-grid, .routes__grid, .principles, .link-cards, .ticks--two {
        grid-template-columns: minmax(0, 1fr);
    }
    .programme__grid, .apply__grid, .contact__grid, .page__grid, .profile { gap: 2rem; }
}

@media (max-width: 560px) {
    /* A narrower gutter buys back real reading width on a phone. */
    :root { --gutter: 18px; }

    body { font-size: 16px; }

    /* The tagline is what goes, so that the brand and the menu button still
       sit on one line rather than the header growing a second row. */
    .brand__tag { display: none; }
    .brand__mark { flex-basis: 36px; height: 36px; font-size: 1.1rem; }
    .brand__name { font-size: 1.02rem; }
    .masthead__inner { min-height: 64px; gap: .75rem; }

    .topbar { font-size: .78rem; }
    .topbar__inner { gap: .25rem .9rem; }

    .section { padding: 3rem 0; }
    .section-head { margin-bottom: 1.75rem; }
    .section-head__lead { font-size: 1rem; }

    .crumbs { font-size: .8rem; }
    .crumbs .wrap { gap: .35rem; padding-top: .75rem; padding-bottom: .75rem; }

    /* A thumb hits a full-width button; two half-width ones it misses. */
    .btn { width: 100%; }
    .hero__actions .btn, .cta-band__actions .btn, .receipt__actions .btn, .miss__actions .btn { flex: 1 1 100%; }
    .ledger__row { flex-wrap: wrap; }
    .ledger__leader { display: none; }

    /* Side by side the fee and the button starve each other, so the price
       takes a line of its own and the button takes the full width. */
    .bcn-card__foot { flex-direction: column; align-items: stretch; gap: .8rem; padding: 1.1rem 1.25rem; }
    .bcn-card__price { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; }
    .bcn-card__price small { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* --------------------------------------------------------------------------
   Print - the payment receipt is the page people print
   -------------------------------------------------------------------------- */

@media print {
    .topbar, .masthead, .site-footer, .cta-band, .receipt__actions, .skip-link { display: none !important; }
    body { font-size: 12pt; color: #000; }
    .receipt__card { border: 1px solid #000; box-shadow: none; }
    a { text-decoration: none; color: #000; }
}

/* ==========================================================================
   The chosen design

   Rounded cards on a blue field, a photograph behind every heading, and a
   round accent button wherever something can be opened. Everything here reads
   from the same four brand colours as the rest of the site, so the palette is
   still one change in Settings rather than a rewrite.
   ========================================================================== */

:root {
    --round: 18px;
    --round-lg: 26px;
    --round-pill: 999px;
    --lift: 0 24px 50px -30px rgba(9, 30, 66, .45);
    --lift-sm: 0 14px 30px -20px rgba(9, 30, 66, .4);
}

/* --------------------------------------------------------------------------
   Pictures, and what stands in for them
   -------------------------------------------------------------------------- */

.media { position: relative; overflow: hidden; border-radius: var(--round-lg); background: var(--teal-soft); }
.media__img { width: 100%; height: 100%; object-fit: cover; display: block; }

.media--round { border-radius: 50%; aspect-ratio: 1; }
.media--tall { aspect-ratio: 4 / 5; }
.media--wide { aspect-ratio: 16 / 9; }

/*
 * The panel that stands in for a photograph. Drawn from the brand colours, so
 * it is unmistakably part of the site and unmistakably not a person.
 */
.media__panel {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    /*
     * Painted with whatever the college chose, because this panel covers the
     * whole hero when there is no photograph - and a gradient nobody can see
     * because a fixed one is drawn on top of it is not a setting, it is a
     * lie. Worse: the lettering was being worked out from the chosen colour
     * while the panel stayed dark, which put black words on a navy hero.
     */
    background:
        radial-gradient(120% 120% at 18% 12%, rgba(255, 255, 255, .16) 0%, transparent 55%),
        var(--brand-surface);
    overflow: hidden;
}
.media__weave {
    position: absolute;
    inset: -20%;
    opacity: .5;
    background-image:
        linear-gradient(rgba(255, 255, 255, .10) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .10) 1px, transparent 1px);
    background-size: 46px 46px;
    transform: rotate(-8deg);
}
.media__mark {
    position: relative;
    display: grid;
    place-items: center;
    width: 5.5rem;
    height: 5.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .28);
    color: #fff;
    font-family: var(--serif);
    font-size: 2.4rem;
    line-height: 1;
}
.media__panel--round .media__mark { width: 7rem; height: 7rem; font-size: 3rem; }
.media__panel--banner .media__mark { width: 4rem; height: 4rem; font-size: 1.8rem; }

/* Behind a heading the panel is a background, not a subject: the mark
   would sit exactly where the words are. */
.hero__media .media__mark,
.page-banner__media .media__mark { display: none; }

/* --------------------------------------------------------------------------
   Shapes shared across the design
   -------------------------------------------------------------------------- */

.btn { border-radius: var(--round-pill); padding: .95rem 1.8rem; }
.btn--compact { padding: .6rem 1.2rem; }
.btn--primary { background: var(--teal); color: var(--white); }
.btn--primary:hover { background: var(--teal-deep); color: var(--white); }
.btn--light { background: var(--white); color: var(--teal); }
.btn--light:hover { background: var(--teal-soft); color: var(--teal-deep); }

/* The small rounded label above nearly every heading in the design. */
.pill-label {
    display: inline-block;
    margin: 0 0 1rem;
    padding: .4rem 1rem;
    border-radius: var(--round-pill);
    background: var(--teal-soft);
    color: var(--teal);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.pill-label--light { background: rgba(255, 255, 255, .16); color: #fff; }

.section-head__title--light { color: #fff; }
.section-head__lead--light { color: rgba(255, 255, 255, .82); }
.section__more--center { text-align: center; }

/* --------------------------------------------------------------------------
   The opening, over a photograph
   -------------------------------------------------------------------------- */

/* Whatever the college chose: a flat colour, or a gradient across it. */
.hero--photo { position: relative; background: var(--brand-surface); color: var(--on-brand); isolation: isolate; }
.hero--photo .hero__media { position: absolute; inset: 0; z-index: -2; }
.hero--photo .hero__media .media__img { width: 100%; height: 100%; object-fit: cover; }
.hero--photo .hero__media .media__panel { border-radius: 0; }

/* Dark enough for white text at AA, from the side the words sit on. */
.hero__veil {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(100deg, rgba(8, 24, 45, .92) 0%, rgba(8, 24, 45, .78) 46%, rgba(8, 24, 45, .45) 100%);
}

.hero--photo .hero__title { max-width: 18ch; }
.hero--photo .statement { box-shadow: var(--lift); border-radius: var(--round-lg); }

/* --------------------------------------------------------------------------
   The same treatment behind a page heading
   -------------------------------------------------------------------------- */

.page-banner--photo { position: relative; isolation: isolate; overflow: hidden; }
.page-banner__media { position: absolute; inset: 0; z-index: -2; }
.page-banner__media .media__img { width: 100%; height: 100%; object-fit: cover; }
.page-banner__media .media__panel { border-radius: 0; }
.page-banner__veil {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(100deg, rgba(8, 24, 45, .9) 0%, rgba(8, 24, 45, .72) 60%, rgba(8, 24, 45, .5) 100%);
}

/* --------------------------------------------------------------------------
   The introduction
   -------------------------------------------------------------------------- */

.intro__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}
.intro__title { font-size: clamp(1.9rem, 3.6vw, 2.8rem); margin-bottom: 1.25rem; }
.intro__columns { columns: 2; column-gap: 2.5rem; color: var(--muted); }
.intro__columns p { margin: 0 0 1rem; break-inside: avoid; }
.intro__actions { margin-top: 1.5rem; }
.intro__portrait { position: relative; }
.intro__portrait .media { box-shadow: var(--lift); border: 6px solid var(--white); }

/* --------------------------------------------------------------------------
   The figures, on the blue
   -------------------------------------------------------------------------- */

.figures { background: var(--teal); }
/*
 * The hairlines between figures are this element showing through the
 * one-pixel gaps. It is also a .wrap, so its side padding was showing
 * through too - a pale slab at each end of the row, which is what read
 * as a band of stray background. The row runs to the edge of the wrap
 * instead; each figure carries its own padding.
 */
.figures__grid {
    background: rgba(255, 255, 255, .16);
    padding-left: 0;
    padding-right: 0;
}
.figure { background: var(--teal); }
.figure__value { color: #fff; }
.figure__label { color: rgba(255, 255, 255, .78); }

/* --------------------------------------------------------------------------
   Programmes, as cards on a blue field
   -------------------------------------------------------------------------- */

.programmes-band {
    background: linear-gradient(180deg, var(--teal) 0%, var(--teal-deep) 100%);
    color: #fff;
}

.p-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    /*
     * The portrait stands 3.25rem above its card and the round button
     * hangs 1.4rem below it, so on a page of several rows the gap has to
     * clear both - otherwise the next row of cards simply covers them.
     */
    gap: 5.5rem 1.5rem;
    /* One height across the row: three cards with different amounts of
       text left a ragged bottom edge that read as a mistake. */
    align-items: stretch;
    /* Room above for the portraits that overhang the cards, and below for
       the staggered card and the round button that hangs off its foot. */
    padding-top: 3.5rem;
    padding-bottom: 5rem;
}

.p-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 4rem 1.5rem 3.25rem;
    border-radius: var(--round-lg);
    background: var(--white);
    /* Stated, not inherited: this card sits inside a band that sets white
       text for its own heading, and a white title on a white card is an
       invisible one. */
    color: var(--ink);
    box-shadow: var(--lift);
    text-align: center;
    transition: transform .2s ease;
}
.p-card--raised { transform: translateY(2.25rem); }
.p-card:hover { transform: translateY(-4px); }
.p-card--raised:hover { transform: translateY(calc(2.25rem - 4px)); }

/* The portrait sits over the top edge. */
.p-card__portrait {
    position: absolute;
    top: 0;
    left: 50%;
    width: 6.5rem;
    height: 6.5rem;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid var(--white);
    box-shadow: var(--lift-sm);
    background: var(--teal-soft);
}
.p-card__portrait .media__img,
.p-card__portrait .media__panel { position: absolute; inset: 0; width: 100%; height: 100%; }
.p-card__portrait .media__panel { border-radius: 0; }
.p-card__portrait .media__mark { width: 2.6rem; height: 2.6rem; font-size: 1.1rem; }

.p-card__body { flex: 1 1 auto; display: flex; flex-direction: column; }
.p-card__eyebrow {
    margin: 0 0 .4rem;
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent-ink);
}
.p-card__title { font-size: 1.15rem; margin-bottom: .5rem; line-height: 1.3; }
.p-card__title a { text-decoration: none; color: inherit; }
.p-card__title a:hover { color: var(--teal); }
.p-card__text { margin: 0 0 .9rem; font-size: .92rem; color: var(--muted); }

.p-card__facts {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .4rem;
    margin: 0 0 .9rem;
    padding: 0;
}
.p-card__facts li {
    padding: .25rem .7rem;
    border-radius: var(--round-pill);
    background: var(--teal-soft);
    color: var(--teal);
    font-size: .74rem;
    font-weight: 600;
}
.p-card__facts .is-closed { background: var(--accent-soft); color: var(--accent-ink); }

/*
 * The foot of the card is what lines up, not the head of it.
 *
 * Titles run to one line or two and descriptions to three, four or five, so
 * anything measured from the top of a card lands somewhere different on
 * every card in the row. Only the fee used to be pinned to the floor, which
 * left the badges above it scattered by as much as seventy pixels.
 *
 * So the countdown, the badges and the fee travel together as one block
 * anchored to the bottom, and the slack collects above them, where a ragged
 * edge is white space nobody reads.
 */
.p-card__foot-start { margin-top: auto; }

/* Holds its slot without saying anything; see the card partial. */
.countdown--card.is-blank { visibility: hidden; }

.p-card__fee { margin: 0; padding-top: 1rem; font-size: .9rem; }
.p-card__fee small { display: block; color: var(--muted); font-size: .72rem; }
.p-card__fee strong { font-size: 1.05rem; color: var(--teal); }

/* The round button the design puts at the foot of every card. */
.p-card__more {
    position: absolute;
    bottom: 0;
    left: 50%;
    display: grid;
    place-items: center;
    width: 2.8rem;
    height: 2.8rem;
    transform: translate(-50%, 50%);
    border-radius: 50%;
    background: var(--accent);
    box-shadow: var(--lift-sm);
    transition: background .15s ease, transform .15s ease;
}
.p-card__more:hover { background: var(--accent-ink); transform: translate(-50%, 50%) scale(1.06); }
.p-card__plus, .p-card__plus::before {
    content: "";
    position: absolute;
    background: #fff;
    border-radius: 2px;
}
.p-card__plus { width: 14px; height: 2px; }
.p-card__plus::before { width: 2px; height: 14px; left: 6px; top: -6px; }

/* --------------------------------------------------------------------------
   The mission
   -------------------------------------------------------------------------- */

.mission {
    padding: clamp(3.5rem, 7vw, 6rem) 0;
    background: var(--brand-surface);
    color: var(--on-brand);
    text-align: center;
}
.mission__inner { max-width: 46rem; margin: 0 auto; }
.mission__title { font-size: clamp(1.9rem, 4vw, 2.9rem); margin-bottom: 1rem; }
.mission__body { margin: 0 0 2rem; color: rgba(255, 255, 255, .84); font-size: 1.05rem; }

/* --------------------------------------------------------------------------
   Three steps, beside a photograph
   -------------------------------------------------------------------------- */

.steps-section__grid {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}
.steps-section__media .media { box-shadow: var(--lift); }

.how { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: .85rem; }

.how-card {
    border-radius: var(--round);
    background: var(--white);
    border: 1px solid var(--line-soft);
    box-shadow: var(--lift-sm);
    overflow: hidden;
    transition: background .2s ease, color .2s ease;
}
.how-card__head {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    background: none;
    border: 0;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
}
.how-card__n {
    flex: 0 0 auto;
    font-family: var(--serif);
    font-size: 1.5rem;
    color: var(--muted);
    transition: color .2s ease;
}
.how-card__text { flex: 1 1 auto; min-width: 0; }
.how-card__text small {
    display: block;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
}
.how-card__text strong { display: block; font-family: var(--serif); font-size: 1.25rem; font-weight: 500; }

/* The round arrow, which becomes a cross when the step is open. */
.how-card__mark {
    position: relative;
    flex: 0 0 auto;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    background: var(--accent);
    transition: transform .2s ease, background .2s ease;
}
.how-card__mark::before,
.how-card__mark::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    background: #fff;
    border-radius: 2px;
    transition: opacity .2s ease;
}
.how-card__mark::before { width: 12px; height: 2px; transform: translate(-50%, -50%); }
.how-card__mark::after { width: 2px; height: 12px; transform: translate(-50%, -50%); }

/*
 * Opening and shutting by animating the row size needs exactly one child to
 * measure, which is what the inner wrapper is for.
 */
.how-card__body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .25s ease;
}
.how-card__inner { overflow: hidden; }
.how-card__body p { margin: 0 0 .75rem; padding: 0 1.25rem; color: var(--muted); font-size: .95rem; }
.how-card__body .text-link { margin: 0 1.25rem 1.25rem; display: inline-block; }

.how-card.is-open { background: var(--teal); color: #fff; border-color: transparent; }
.how-card.is-open .how-card__n,
.how-card.is-open .how-card__text small { color: rgba(255, 255, 255, .7); }
.how-card.is-open .how-card__mark::after { opacity: 0; }
.how-card.is-open .how-card__body { grid-template-rows: 1fr; }
.how-card.is-open .how-card__body p { color: rgba(255, 255, 255, .84); }
.how-card.is-open .text-link { color: #fff; }

/* --------------------------------------------------------------------------
   The short message form
   -------------------------------------------------------------------------- */

.message-band {
    padding: clamp(3.5rem, 7vw, 5.5rem) 0;
    background: var(--brand-surface);
    color: var(--on-brand);
    text-align: center;
}
.message-band__inner { max-width: 52rem; margin: 0 auto; }
.message-band__title { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-bottom: .6rem; }
.message-band__lead { margin: 0 0 2rem; color: rgba(255, 255, 255, .8); }

.message-form { display: grid; gap: .75rem; }
.message-form__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.message-form input,
.message-form textarea {
    width: 100%;
    padding: .95rem 1.1rem;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: var(--round);
    background: rgba(255, 255, 255, .1);
    color: #fff;
    font: 400 .98rem var(--sans);
}
.message-form textarea { resize: vertical; border-radius: var(--round); }
.message-form input::placeholder,
.message-form textarea::placeholder { color: rgba(255, 255, 255, .6); }
.message-form input:focus,
.message-form textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
    background: rgba(255, 255, 255, .16);
}
.message-form .btn { justify-self: center; margin-top: .5rem; }

/* --------------------------------------------------------------------------
   Contact information
   -------------------------------------------------------------------------- */

.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1.5rem;
    align-items: stretch;
}
.contact-card {
    padding: 2rem 1.75rem;
    border-radius: var(--round-lg);
    background: var(--white);
    border: 1px solid var(--line-soft);
    box-shadow: var(--lift-sm);
    text-align: center;
}
.contact-card--map { padding: 0; overflow: hidden; min-height: 15rem; }
.contact-card--map iframe { width: 100%; height: 100%; min-height: 15rem; border: 0; display: block; }

.contact-card__icon {
    display: grid;
    place-items: center;
    width: 3.2rem;
    height: 3.2rem;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: var(--teal-soft);
    position: relative;
}
/* A pin, and a handset, drawn rather than fetched. */
.contact-card__icon--place::before {
    content: "";
    width: 14px;
    height: 14px;
    border: 3px solid var(--teal);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
}
.contact-card__icon--call::before {
    content: "";
    width: 16px;
    height: 16px;
    border: 3px solid var(--teal);
    border-radius: 50% 50% 50% 3px;
}

.contact-card__title { font-size: 1.15rem; margin-bottom: .6rem; }
.contact-card__text { margin: 0 0 .3rem; color: var(--muted); }
.contact-card__text a { text-decoration: none; }
.contact-card__note { margin: .75rem 0 0; font-size: .88rem; color: var(--muted); }

/* --------------------------------------------------------------------------
   Coming into view
   -------------------------------------------------------------------------- */

/*
 * Only once the script has run and said it is watching. Until then - and for
 * ever, if the script never arrives - these are ordinary visible sections.
 */
/*
 * The hidden state belongs to the not-yet-reached element only. Saying
 * "transform: none" on the arrived one looks harmless and is not: it is
 * a more particular selector than .p-card:hover or .p-card--raised, so it
 * quietly cancelled the lift on hover and the stagger down the row. Once
 * a section has arrived it simply stops being held, and whatever
 * transform the element has of its own takes over.
 */
.reveal-ready [data-reveal]:not(.is-in) { opacity: 0; transform: translateY(14px); }
.reveal-ready [data-reveal].is-in {
    opacity: 1;
    transition: opacity .5s ease, transform .5s ease;
}

@media (prefers-reduced-motion: reduce) {
    .reveal-ready [data-reveal]:not(.is-in) { opacity: 1; transform: none; }
    .p-card:hover, .p-card--raised:hover { transform: none; }
}

/* --------------------------------------------------------------------------
   Narrower
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
    .intro__grid { grid-template-columns: minmax(0, 1fr); }
    /* The width is stated. An automatic margin on a grid item turns off
       the stretch that would otherwise give it one, and the portrait -
       whose only child is positioned, so it measures nothing - collapsed
       to the six pixels of its own border. */
    .intro__portrait { width: 100%; max-width: 22rem; margin: 0 auto; }
    .steps-section__grid { grid-template-columns: minmax(0, 1fr); }
    .steps-section__media { max-width: 26rem; }
}

@media (max-width: 900px) {
    .intro__columns { columns: 1; }
}

@media (max-width: 640px) {
    /* One under the other, and the same clearance between them. */
    .p-cards { grid-template-columns: minmax(0, 1fr); gap: 5.5rem; padding-top: 3.5rem; }
    .p-card--raised { transform: none; }
    .p-card--raised:hover { transform: translateY(-4px); }
    .message-form__row { grid-template-columns: minmax(0, 1fr); }
    .contact-cards { grid-template-columns: minmax(0, 1fr); }
    .hero--photo .hero__title { max-width: none; }
    .steps-section__media { max-width: none; }
}
/* --------------------------------------------------------------------------
   The bar the footer starts with

   One rounded strip of the same places the masthead offers, so somebody who
   has read to the bottom of a long page can go on without scrolling back up.
   -------------------------------------------------------------------------- */

.footer-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: .35rem;
    margin: 0 0 3rem;
    padding: .5rem;
    border-radius: var(--round-pill);
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .14);
}
.footer-bar__link,
.footer-bar__cta {
    padding: .55rem 1.1rem;
    border-radius: var(--round-pill);
    font-size: .92rem;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: background .2s ease, color .2s ease;
}
.footer-bar__link { color: rgba(255, 255, 255, .78); }
.footer-bar__link:hover,
.footer-bar__link:focus-visible { background: rgba(255, 255, 255, .12); color: #fff; }
.footer-bar__link.is-current { background: #fff; color: var(--teal); font-weight: 600; }

.site-footer .footer-bar__cta {
    margin-left: .35rem;
    background: var(--accent);
    /* Stated against ".site-footer a", which is more particular than a lone
       class and was colouring this the same as the plain links. */
    color: var(--ink);
    font-weight: 700;
}
.site-footer .footer-bar__cta:hover,
.site-footer .footer-bar__cta:focus-visible { background: #fff; color: var(--teal); }

@media (max-width: 640px) {
    /* A strip of eleven pills is a wall on a phone; let it be a block of them. */
    .footer-bar { gap: .25rem; padding: .6rem; margin-bottom: 2.25rem; }
    .footer-bar__link,
    .footer-bar__cta { padding: .5rem .85rem; font-size: .85rem; }
    .footer-bar__cta { margin-left: 0; }
}

/* --------------------------------------------------------------------------
   The narrowest phones

   Three hundred and twenty pixels is the floor, and at that width the college
   name and the menu button together want more room than there is - so the name
   was ending in an ellipsis on every page. A little less of both, and it fits.
   -------------------------------------------------------------------------- */

@media (max-width: 380px) {
    /*
     * Sized with room to spare rather than to the pixel. At .88rem the name
     * fitted Newsreader by a single pixel and did not fit Playfair Display
     * or Nunito at all - and a design is allowed to change the typeface,
     * so anything this tight is only waiting to break.
     */
    .brand__mark { flex-basis: 28px; height: 28px; font-size: .9rem; }
    .brand__name { font-size: .82rem; }
    .topbar { font-size: .74rem; }
    .topbar__contact { gap: .1rem .8rem; }
}

/* --------------------------------------------------------------------------
   Choosing who to pay through

   Shown when the college has set up more than one gateway that can take the
   money. Built like the fee options on the application form, because it is the
   same kind of decision and should not feel like a new one.
   -------------------------------------------------------------------------- */

.ways { display: grid; gap: .75rem; margin: 1.75rem 0 1.25rem; text-align: left; }

.way {
    display: flex;
    gap: .9rem;
    align-items: flex-start;
    padding: 1rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}
.way:hover { border-color: var(--teal); }
.way:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.way.is-on,
.way:has(input:checked) { border-color: var(--teal); background: var(--teal-soft); }

.way input { margin-top: .25rem; accent-color: var(--teal); }
.way__body { flex: 1 1 auto; min-width: 0; }
.way__name { display: block; font-weight: 700; color: var(--ink); }
.way__note { display: block; margin-top: .2rem; font-size: .88rem; color: var(--muted); }

/* --------------------------------------------------------------------------
   The college's own mark

   A logo takes the place of the lettered square. It keeps the square's
   footprint so nothing around it moves, and is fitted inside rather than
   cropped - a crest cropped to a square is a ruined crest.
   -------------------------------------------------------------------------- */

.brand__mark--logo,
.site-footer__mark--logo {
    background: none;
    object-fit: contain;
    padding: 0;
}

.brand__mark--logo {
    width: auto;
    max-width: 10rem;
    height: 38px;
    flex: 0 0 auto;
}

.site-footer__mark {
    display: block;
    height: 40px;
    width: auto;
    max-width: 12rem;
    margin-bottom: .75rem;
    object-fit: contain;
}

/* When there is no logo the footer shows nothing here: the college's name is
   written out in full immediately below, so a lettered square would only be
   saying it twice. */
span.site-footer__mark { display: none; }

@media (max-width: 1180px) {
    .brand__mark--logo { height: 32px; }
}

@media (max-width: 380px) {
    .brand__mark--logo { height: 28px; max-width: 7.5rem; }
}
