/* A fresh look for each academic year, matched to print (templates/_graphics/yearlyRestyle.twig) */

/*
  The year's colours come from one number on the stage, which the story tweens:
  --g17g-yr-m mixes this year's colours (0, the green family) into next year's
  (1, the purple family). Every colour is a mix of the shared tokens, so dark
  mode still works. The artwork itself is two stacked layers (data-art old/new)
  that the story wipes between.
*/
[data-g17-graphic="yearlyRestyle"] .g17g__stage {
    --g17g-yr-m: 1;
    --g17g-yr-tint: color-mix(in srgb, var(--g17g-green-bg), var(--g17g-purple-bg) calc(var(--g17g-yr-m) * 100%));
    --g17g-yr-main: color-mix(in srgb, var(--g17g-green), var(--g17g-purple) calc(var(--g17g-yr-m) * 100%));
    --g17g-yr-deep: color-mix(in srgb, var(--g17g-green-text), var(--g17g-purple-deep) calc(var(--g17g-yr-m) * 100%));
}
[data-g17-graphic="yearlyRestyle"] .g17g-yr-stack { display: inline-grid; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-stack > * { grid-area: 1 / 1; }

/* The artwork: each piece crops the same drawing, next year's layer over this year's */
[data-g17-graphic="yearlyRestyle"] .g17g-yr-layers { position: relative; display: block; overflow: hidden; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-layers > svg,
[data-g17-graphic="yearlyRestyle"] .g17g-yr-coverArt > svg,
[data-g17-graphic="yearlyRestyle"] .g17g-yr-posterArt > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-svg { overflow: hidden; background: var(--g17g-card); }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-fTint { fill: var(--g17g-purple-bg); }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-fSoft { fill: var(--g17g-purple-soft); }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-fMain { fill: var(--g17g-purple); }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-fDeep { fill: var(--g17g-purple-deep); }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-fAccent { fill: var(--g17g-green); }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-fLight { fill: var(--g17g-card); }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-sTint { fill: var(--g17g-green-bg); }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-sMain { fill: var(--g17g-green); }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-sDeep { fill: var(--g17g-green-text); }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-sLight { fill: var(--g17g-card); }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-sCap { fill: none; stroke: var(--g17g-on-green); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* The homepage, in a browser frame */
[data-g17-graphic="yearlyRestyle"] .g17g-yr-site {
    position: absolute; z-index: 2; display: flex; flex-direction: column; overflow: hidden; border-radius: 1em; background: var(--g17g-card);
    box-shadow: 0 .9em 2.4em var(--g17g-shadow), 0 .1em .35em var(--g17g-shadow-soft), 0 0 0 1px var(--g17g-edge);
}
[data-g17-graphic="yearlyRestyle"] .g17g-yr-bar { flex: none; display: flex; align-items: center; gap: .5em; height: 2.2em; padding: 0 .55em 0 .8em; border-bottom: 1px solid var(--g17g-rule); }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-dots { flex: none; display: flex; gap: .28em; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-dots i { width: .48em; height: .48em; border-radius: 50%; background: var(--g17g-border); }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-url {
    flex: 1; min-width: 0; display: flex; align-items: center; gap: .4em; height: 2.3em; padding: 0 .9em;
    border-radius: 999px; background: var(--g17g-soft); font-size: .58em; color: var(--g17g-muted); white-space: nowrap;
}
[data-g17-graphic="yearlyRestyle"] .g17g-yr-url svg { flex: none; width: 1.15em; height: 1.15em; color: var(--g17g-green); }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-urltext { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* Site header: the logo & layout never change */
[data-g17-graphic="yearlyRestyle"] .g17g-yr-nav { flex: none; display: flex; align-items: center; gap: .5em; padding: .55em .9em; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-logo { flex: none; display: grid; place-items: center; width: 2.4em; height: 2.4em; border-radius: .5em; background: var(--g17g-text); color: var(--g17g-card); font-size: .62em; font-weight: 800; letter-spacing: -.02em; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-org { flex: 1; min-width: 0; font-size: .64em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-links { flex: none; display: flex; gap: 1em; font-size: .56em; font-weight: 600; color: var(--g17g-muted); }

/* The campaign hero: text on the year's tint, the campaign art bleeding off the right */
[data-g17-graphic="yearlyRestyle"] .g17g-yr-hero {
    position: relative; flex: 1; min-height: 0; display: flex; align-items: stretch; margin: 0 .9em;
    border-radius: .8em; background: var(--g17g-yr-tint); overflow: hidden;
}
[data-g17-graphic="yearlyRestyle"] .g17g-yr-heroText { position: relative; z-index: 1; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 0 .3em 0 1em; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-kicker {
    display: inline-flex; gap: .3em; padding: .35em .75em; border-radius: 999px; background: var(--g17g-card);
    font-size: .54em; font-weight: 700; color: var(--g17g-yr-deep); white-space: nowrap;
}
[data-g17-graphic="yearlyRestyle"] .g17g-yr-h1 { margin: .4em 0 .45em; font-size: 1.32em; line-height: 1.08; font-weight: 800; letter-spacing: -.025em; color: var(--g17g-yr-deep); white-space: nowrap; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-cta {
    display: inline-flex; align-items: center; height: 2.5em; padding: 0 1.2em; border-radius: 999px;
    background: var(--g17g-yr-deep); color: var(--g17g-card); font-size: .58em; font-weight: 700; white-space: nowrap;
}
[data-g17-graphic="yearlyRestyle"] .g17g-yr-heroArt { flex: none; width: 42%; }

/* Courses: the campaign pattern behind the section, the art in every card's picture */
[data-g17-graphic="yearlyRestyle"] .g17g-yr-band { position: relative; flex: none; margin: .8em .9em .9em; padding: .7em .7em .75em; border-radius: .8em; overflow: hidden; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-bandBg { position: absolute; inset: 0; opacity: .45; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-sub { position: relative; display: inline-block; margin-bottom: .6em; padding: .3em .75em; border-radius: 999px; background: var(--g17g-card); font-size: .62em; font-weight: 700; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-courses { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: .5em; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-course { min-width: 0; padding: .4em .4em .55em; border-radius: .7em; background: var(--g17g-card); box-shadow: 0 .2em .6em var(--g17g-shadow-soft), 0 0 0 1px var(--g17g-edge); }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-thumb { height: 3.3em; border-radius: .45em; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-course b { display: block; margin: .6em .25em .1em; font-size: .6em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-course > span:last-child { display: block; margin: 0 .3em; font-size: .5em; color: var(--g17g-muted); white-space: nowrap; }

/* Scheduled badge */
[data-g17-graphic="yearlyRestyle"] .g17g-yr-live { color: var(--g17g-purple-deep); }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-live .g17g-badge__icon { color: var(--g17g-on-green); }

/* The print campaign: a prospectus (with its pages behind) and a poster in a bus shelter */
[data-g17-graphic="yearlyRestyle"] .g17g-yr-print { position: absolute; z-index: 2; display: flex; align-items: flex-end; justify-content: space-evenly; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-book { position: relative; height: 94%; aspect-ratio: 1 / 1.414; margin-bottom: 3%; transform: rotate(-2.5deg); }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-book::before {
    content: ""; position: absolute; inset: .2em -.22em -.22em .2em; border-radius: .2em; background: var(--g17g-soft);
    box-shadow: 0 .5em 1.2em var(--g17g-shadow), 0 0 0 1px var(--g17g-border);
}
[data-g17-graphic="yearlyRestyle"] .g17g-yr-cover {
    position: absolute; inset: 0; overflow: hidden; border-radius: .2em; background: var(--g17g-card);
    box-shadow: 0 .1em .3em var(--g17g-shadow-soft), 0 0 0 1px var(--g17g-edge);
}
[data-g17-graphic="yearlyRestyle"] .g17g-yr-coverArt { position: absolute; left: 0; right: 0; top: 0; bottom: 31%; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-coverTop {
    position: absolute; left: .45em; top: .45em; display: inline-flex; align-items: center; gap: .35em; padding: .2em .55em .2em .2em;
    border-radius: 999px; background: var(--g17g-card); font-size: .44em; font-weight: 700; white-space: nowrap;
}
[data-g17-graphic="yearlyRestyle"] .g17g-yr-coverTop i { display: grid; place-items: center; height: 1.7em; padding: 0 .35em; border-radius: 999px; background: var(--g17g-text); color: var(--g17g-card); font-style: normal; font-size: .85em; font-weight: 800; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-coverFoot { position: absolute; left: 0; right: 0; bottom: 0; height: 31%; display: flex; flex-direction: column; justify-content: center; padding: 0 .55em; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-coverFoot em { font-style: normal; font-size: .4em; font-weight: 600; color: var(--g17g-muted); }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-coverFoot b { margin-top: .15em; font-size: .66em; line-height: 1.08; font-weight: 800; letter-spacing: -.02em; text-wrap: balance; }
[data-g17-graphic="yearlyRestyle"] [data-print="old"] .g17g-yr-coverFoot b,
[data-g17-graphic="yearlyRestyle"] [data-print="old"].g17g-yr-poster b { color: var(--g17g-green-text); }
[data-g17-graphic="yearlyRestyle"] [data-print="new"] .g17g-yr-coverFoot b,
[data-g17-graphic="yearlyRestyle"] [data-print="new"].g17g-yr-poster b { color: var(--g17g-purple-deep); }

[data-g17-graphic="yearlyRestyle"] .g17g-yr-shelter { position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-frame {
    position: relative; height: 88%; aspect-ratio: 2 / 3.05; overflow: hidden; border: .28em solid var(--g17g-border-strong); border-radius: .3em; background: var(--g17g-card);
    box-shadow: 0 .5em 1.2em var(--g17g-shadow);
}
[data-g17-graphic="yearlyRestyle"] .g17g-yr-legs { flex: 1; width: 78%; border-left: .28em solid var(--g17g-border-strong); border-right: .28em solid var(--g17g-border-strong); }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-poster { position: absolute; inset: 0; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; background: var(--g17g-card); }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-posterArt { position: relative; flex: none; width: 100%; height: 62%; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-poster b { margin: .55em .5em .45em; font-size: .62em; line-height: 1.08; font-weight: 800; letter-spacing: -.02em; text-wrap: balance; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-posterCta { margin: 0 .55em; padding: .3em .7em; border-radius: 999px; background: var(--g17g-text); color: var(--g17g-card); font-size: .4em; font-weight: 700; white-space: nowrap; }

/* The CMS panel */
[data-g17-graphic="yearlyRestyle"] .g17g-yr-panel { display: flex; flex-direction: column; padding: .85em .95em; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-head { display: flex; align-items: center; justify-content: space-between; gap: .5em; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-seg { position: relative; flex: none; display: grid; grid-template-columns: 1fr 1fr; width: 12em; padding: .22em; border-radius: .6em; background: var(--g17g-soft); font-size: .56em; font-weight: 600; color: var(--g17g-text-soft); }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-seg > span { position: relative; padding: .45em 0; text-align: center; white-space: nowrap; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-segOn { position: absolute; top: .22em; bottom: .22em; left: .22em; width: calc(50% - .22em); border-radius: .45em; background: var(--g17g-card); box-shadow: 0 .1em .3em var(--g17g-shadow); transform: translateX(100%); }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-label { display: flex; align-items: center; justify-content: space-between; margin: 1.2em 0 .5em; font-size: .6em; font-weight: 600; color: var(--g17g-muted); }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-upload {
    display: inline-flex; align-items: center; gap: .35em; padding: .3em .75em; border-radius: 999px; background: var(--g17g-soft);
    font-size: .95em; font-weight: 700; color: var(--g17g-text); white-space: nowrap;
}
[data-g17-graphic="yearlyRestyle"] .g17g-yr-upload svg { width: 1.2em; height: 1.2em; color: var(--g17g-green); }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45em; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-tile { min-width: 0; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-tileImg { height: 2.7em; border-radius: .4em; box-shadow: 0 0 0 1px var(--g17g-edge); }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-tileName { display: block; margin-top: .45em; font-size: .5em; font-weight: 600; color: var(--g17g-text-soft); white-space: nowrap; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-row { display: flex; align-items: center; gap: .5em; margin-top: .7em; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-rowLabel { flex: none; width: 5.6em; font-size: .56em; font-weight: 600; color: var(--g17g-muted); }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-field { flex: 1; min-width: 0; height: 2.2em; font-size: .6em; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-field > span { align-self: center; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-swatches { flex: 1; min-width: 0; display: flex; justify-content: space-between; gap: .3em; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-swatch { display: flex; align-items: center; gap: .3em; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-chipcol { flex: none; display: block; width: 1.1em; height: 1.1em; border-radius: .3em; box-shadow: inset 0 0 0 1px var(--g17g-edge); }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-chipcol--deep { background: var(--g17g-yr-deep); }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-chipcol--main { background: var(--g17g-yr-main); }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-chipcol--tint { background: var(--g17g-yr-tint); box-shadow: inset 0 0 0 1px var(--g17g-border); }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-hex { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .5em; font-weight: 600; color: var(--g17g-text); white-space: nowrap; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-guards { display: flex; flex-wrap: wrap; gap: .35em; margin-top: auto; padding-top: .7em; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-guards .g17g-chip { font-size: .54em; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-guards .g17g-chip svg { width: 1.2em; height: 1.2em; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-foot { display: flex; align-items: center; justify-content: space-between; gap: .4em; margin-top: .7em; padding-top: .6em; border-top: 1px solid var(--g17g-rule); }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-date { display: flex; align-items: center; gap: .4em; font-size: .56em; font-weight: 700; white-space: nowrap; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-date svg { flex: none; width: 1.5em; height: 1.5em; color: var(--g17g-purple); }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-date em { display: block; font-style: normal; font-weight: 500; color: var(--g17g-muted); }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-btn { position: relative; flex: none; width: 7.6em; height: 2.4em; border-radius: 999px; overflow: hidden; background: var(--g17g-green); color: var(--g17g-on-green); font-size: .6em; font-weight: 700; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-btnLabel { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: .3em; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-btnLabel svg { width: 1.1em; height: 1.1em; }

/* The pointer: a full stage layer that moves by xPercent / yPercent, so the tip lands on a stage % */
[data-g17-graphic="yearlyRestyle"] .g17g-yr-track { position: absolute; inset: 0; z-index: 8; pointer-events: none; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-cursor {
    position: absolute; left: 0; top: 0; width: 1.55em; height: 1.55em; margin: -.13em 0 0 -.2em; transform-origin: 13% 8%;
    filter: drop-shadow(0 .15em .25em var(--g17g-shadow));
}
[data-g17-graphic="yearlyRestyle"] .g17g-yr-cursor path { fill: var(--g17g-card); stroke: var(--g17g-text); stroke-width: 1.5; stroke-linejoin: round; }
[data-g17-graphic="yearlyRestyle"] .g17g-yr-click { position: absolute; left: -.8em; top: -.8em; width: 1.6em; height: 1.6em; border-radius: 50%; border: 2px solid var(--g17g-green); opacity: 0; }
