/*
 * Three looks of the same page, chosen by <html data-look="...">:
 * split (default), framed, students.
 * The markup never changes; only these rules do.
 */

:root {
	--inset: max(var(--gutter), calc((100% - 1200px) / 2));
}

/* ---------- Shared home layout ---------- */

.home-section {
	padding-block: var(--section);
	padding-inline: var(--gutter);
}

.home-section__inner {
	max-width: 1200px;
	margin-inline: auto;
}

.home-section h2 {
	font-size: var(--wp--preset--font-size--heading-2);
	margin: 0 0 24px;
}

.home-section--ranking {
	background: var(--navy-dark);
	color: var(--white);
	padding-block: 48px;
}

.home-section--ranking .ranking__badges img {
	width: auto;
	height: 96px;
	background: var(--white);
	padding: 6px;
}

.home-section--open-day {
	background: var(--navy-light);
}

.open-day {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: 48px;
	align-items: center;
}

.open-day h2 a {
	color: var(--navy-dark);
}

.open-day p {
	margin: 0 0 8px;
}

.news-layout {
	display: grid;
	grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
	gap: 48px;
	align-items: start;
}

.news-list .wp-block-post-template {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
	margin: 0;
	padding: 0;
}

.news-list .wp-block-post-template > li {
	margin: 0;
}

.news-card .wp-block-post-featured-image {
	aspect-ratio: 3 / 2;
}

.news-card .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
}

.news-card__body {
	padding: 20px 24px 24px;
	display: grid;
	gap: 8px;
}

.news-card__body > * {
	margin: 0;
}

.news-card .wp-block-post-title {
	font-size: 22px;
	line-height: 1.25;
	font-weight: 600;
}

.home-aside {
	background: var(--navy-light);
	border-radius: var(--radius-md);
	padding: 24px;
}

@media (min-width: 960px) {
	.home-aside {
		position: sticky;
		top: 24px;
	}
}

.home-aside h2 {
	font-size: 28px;
	margin-bottom: 8px;
}

.matura {
	display: grid;
	grid-template-columns: 200px minmax(0, 720px);
	gap: 48px;
	align-items: start;
}

.matura__badge img {
	box-sizing: border-box;
	width: 200px;
	height: auto;
	display: block;
}

.home-section--contests {
	background: var(--navy-light);
}

.contests {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
}

.contests .poster-card {
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius-md);
	padding: 24px;
}

.contests h2 {
	font-size: 24px;
	line-height: 1.2;
}

.jobs {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	gap: 16px 32px;
	align-items: center;
}

.jobs__icon {
	display: grid;
	place-items: center;
	width: 64px;
	height: 64px;
	border-radius: var(--radius-md);
	background: var(--navy);
	color: var(--gold);
}

.jobs__icon svg {
	width: 32px;
	height: 32px;
}

.jobs h2 {
	margin: 0 0 4px;
	font-size: 24px;
	line-height: 1.2;
}

.jobs p {
	margin: 0;
}

.jobs .label {
	margin-bottom: 4px;
}

@media (max-width: 959px) {
	.open-day,
	.news-layout,
	.matura,
	.contests {
		grid-template-columns: minmax(0, 1fr);
		gap: 32px;
	}

	.matura__badge img {
		width: 140px;
	}
}

@media (max-width: 639px) {
	.news-list .wp-block-post-template,
	.open-day-photos {
		grid-template-columns: minmax(0, 1fr);
	}

	.open-day-photos img:not(:first-child) {
		display: none;
	}

	.jobs {
		grid-template-columns: auto minmax(0, 1fr);
	}

	.jobs__icon {
		width: 48px;
		height: 48px;
	}

	.jobs > .more-link {
		grid-column: 1 / -1;
	}
}

/* ---------- Header: shared ---------- */

.site-utility {
	background: var(--navy-dark);
	color: var(--white);
}

.site-utility a {
	color: var(--white);
}

.site-utility :where(a):focus-visible {
	outline-color: var(--gold);
	box-shadow: none;
}

.site-utility p {
	margin: 0;
}

.site-header__main {
	background: var(--white);
	padding-block: 16px;
}

.site-nav {
	background: var(--navy);
	color: var(--white);
}

.site-nav .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content {
	padding-inline: 16px;
}

/* The arrow belongs to its item: tucked into the item's padding, with the usual gap before the next one. */
.site-nav .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation__submenu-icon {
	margin-inline: -8px 16px;
}

.site-nav .wp-block-navigation__submenu-container {
	color: var(--ink);
}

.site-nav :where(.wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content, .wp-block-navigation__responsive-container-open):focus-visible {
	outline-color: var(--gold);
	box-shadow: none;
}

@media (max-width: 959px) {
	.site-utility {
		display: none;
	}
}

@media (max-width: 599px) {
	.site-header__main {
		padding-block: 8px;
	}

	.site-nav {
		padding-block: 4px;
	}
}

/* ---------- Hero: shared ---------- */

.hero {
	display: grid;
	background: var(--navy-dark);
	color: var(--white);
}

/* The photo fills whatever box a look gives it; it never sets the hero's height itself. */
.hero__photo {
	margin: 0;
	min-height: 0;
	position: relative;
	overflow: hidden;
}

.hero__photo img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hero__title,
.hero__schools {
	position: relative;
	z-index: 2;
}

.hero__eyebrow {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 16px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--gold);
	margin: 0 0 12px;
}

.hero h1 {
	font-size: var(--wp--preset--font-size--display);
	line-height: 1.05;
	color: inherit;
	margin: 0;
}

.hero__schools {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.hero__school {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 56px;
	padding: 8px 20px 8px 8px;
	border-radius: var(--radius-sm);
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 18px;
	line-height: 1.2;
	text-decoration: none;
	color: inherit;
}

.hero__school img {
	width: 40px;
	height: 40px;
	padding: 4px;
	border-radius: 50%;
	background: var(--white);
	object-fit: contain;
	flex: none;
}

.hero__school:hover span {
	text-decoration: underline;
}

.hero :where(a):focus-visible {
	outline-color: var(--gold);
	box-shadow: none;
}

/* Small screens: one stack for every look, never text on the photo. */
@media (max-width: 959px) {
	.hero {
		grid-template-columns: minmax(0, 1fr);
	}

	/* hero.php serves the closer phone crop here, with the aircraft in front. */
	.hero__photo {
		aspect-ratio: 4 / 3;
	}

	.hero__title {
		padding: 24px var(--gutter) 0;
	}

	.hero__schools {
		flex-direction: column;
		padding: 24px var(--gutter) 32px;
	}
}

/* ---------- Look 1: split, text left, photo right ---------- */

@media (min-width: 960px) {
	/* The whole photo at its own 3:2 shape, so the aircraft is never cut. */
	[data-look="split"] .hero__photo {
		aspect-ratio: 3 / 2;
	}

	[data-look="split"] .hero__photo img {
		object-position: 60% 100%;
	}

	/* Columns: page margin, text (40% of the 1200 px page column), photo to the right edge. */
	[data-look="split"] .hero {
		grid-template-columns: var(--inset) calc((100% - 2 * var(--inset)) * 0.4) minmax(0, 1fr);
		grid-template-rows: minmax(0, 1fr) auto auto minmax(0, 1fr);
	}

	/* The photo keeps 3:2 and sets the height; if the text needs more, only the sides are cropped. */
	[data-look="split"] .hero__photo {
		grid-column: 3;
		grid-row: 1 / -1;
		width: 100%;
		align-self: stretch;
	}

	[data-look="split"] .hero__title {
		grid-column: 2;
		grid-row: 2;
		padding: 48px 48px 0 0;
	}

	[data-look="split"] .hero h1 {
		font-size: clamp(44px, 4.2vw, 64px);
	}

	[data-look="split"] .hero__schools {
		grid-column: 2;
		grid-row: 3;
		flex-direction: column;
		gap: 12px;
		padding: 32px 48px 48px 0;
	}
}

[data-look="split"] .hero__school {
	background: var(--white);
	color: var(--navy-dark);
	padding-right: 16px;
	transition: background-color 150ms var(--ease);
}

[data-look="split"] .hero__school span {
	flex: 1;
}

[data-look="split"] .hero__school::after {
	content: "→" / "";
	color: var(--navy);
	transition: transform 150ms var(--ease);
}

[data-look="split"] .hero__school:hover {
	background: var(--navy-light);
}

[data-look="split"] .hero__school:hover::after {
	transform: translateX(3px);
}

[data-look="split"] .site-utility {
	background: var(--navy-light);
	color: var(--ink);
}

[data-look="split"] .site-utility a {
	color: var(--ink);
}

[data-look="split"] .site-utility :where(a):focus-visible {
	outline-color: var(--navy-dark);
}

[data-look="split"] .site-nav {
	background: var(--white);
	color: var(--navy-dark);
	border-bottom: 2px solid var(--navy-dark);
}

[data-look="split"] .site-header__main {
	border-bottom: 0;
	padding-bottom: 0;
}

[data-look="split"] .site-nav :where(.wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content, .wp-block-navigation__responsive-container-open):focus-visible {
	outline-color: var(--navy-dark);
	box-shadow: 0 0 0 5px var(--white);
}

/* Ranking: a compact white strip, so the navy hero ends on a clean edge. */
[data-look="split"] .home-section--ranking {
	background: var(--white);
	color: var(--ink);
	padding-block: 32px;
}

[data-look="split"] .home-section--ranking .ranking__badges img {
	height: 112px;
	padding: 0;
	border: 1px solid var(--line);
}

[data-look="split"] .ranking__list li {
	border-left-color: var(--line);
	font-size: 18px;
}

[data-look="split"] .ranking__list strong {
	color: var(--navy);
	font-size: clamp(36px, 3.4vw, 48px);
}

[data-look="split"] .news-card,
[data-look="split"] .contests .poster-card,
[data-look="split"] .home-aside {
	border-radius: var(--radius-sm);
	box-shadow: none;
}

[data-look="split"] .news-card:hover {
	box-shadow: none;
	border-color: var(--navy);
}

/* The text sits right under the photo, without the block gap WordPress adds. */
[data-look="split"] .home-section--open-day,
[data-look="split"] .home-section--contests {
	background: var(--white);
	border-top: 1px solid var(--line);
}

[data-look="split"] .home-section--matura {
	background: var(--navy-dark);
	color: var(--white);
}

[data-look="split"] .home-section--matura h2 {
	color: var(--white);
}

[data-look="split"] .home-section--matura .matura__badge img {
	background: var(--white);
	border-radius: var(--radius-sm);
	padding: 8px;
}

[data-look="split"] .home-section--matura :where(a):focus-visible {
	outline-color: var(--gold);
	box-shadow: none;
}

[data-look="split"] .home-section--jobs {
	background: var(--navy-light);
}

[data-look="split"] .home-section:not(.home-section--ranking) {
	padding-block: clamp(48px, 5vw, 64px);
}

[data-look="split"] .open-day h2 a {
	text-decoration-thickness: 2px;
	text-underline-offset: 0.2em;
	text-decoration-color: rgb(27 42 87 / 0.35);
}

[data-look="split"] .open-day h2 a:hover {
	text-decoration-color: currentColor;
}

@media (min-width: 600px) and (max-width: 959px) {
	[data-look="split"] .hero__schools {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 959px) {
	[data-look="split"] .home-section--ranking .ranking__badges img {
		height: 88px;
	}

	[data-look="split"] .ranking {
		gap: 20px;
	}

	[data-look="split"] .ranking__list li {
		padding: 4px 16px;
		font-size: 17px;
	}
}

/* ---------- Look 2: framed photo with a white title card ---------- */

[data-look="framed"] {
	--f-radius: 12px;
	--f-frame: 8px;
}

[data-look="framed"] body:has(.home) {
	background: var(--navy-light);
}

/* The photo sits in a white frame, like a print; the title card is the same white. */
[data-look="framed"] .hero {
	background: transparent;
	color: var(--navy-dark);
	max-width: 1200px;
	margin-inline: auto;
	padding: 24px var(--gutter) 0;
	box-sizing: content-box;
}

[data-look="framed"] .hero__photo {
	z-index: 2;
	border: var(--f-frame) solid var(--white);
	border-radius: calc(var(--f-radius) + var(--f-frame));
	background: var(--white);
	box-shadow: var(--shadow-raised);
}

[data-look="framed"] .hero__photo img {
	border-radius: var(--f-radius);
}

[data-look="framed"] .hero::after {
	content: "";
	z-index: 1;
	background: var(--white);
	border-radius: var(--f-radius);
}

[data-look="framed"] .hero__eyebrow {
	color: var(--navy);
	font-size: 15px;
	margin-bottom: 8px;
}

[data-look="framed"] .hero h1 {
	font-size: clamp(32px, 3.2vw, 42px);
	line-height: 1.08;
}

[data-look="framed"] .hero__schools {
	flex-direction: column;
	gap: 0;
}

[data-look="framed"] .hero__school {
	min-height: 64px;
	padding: 8px 0;
	gap: 14px;
	font-size: 19px;
	color: var(--navy-dark);
	border-top: 1px solid var(--line);
	border-radius: 0;
}

[data-look="framed"] .hero__school::after {
	content: "→";
	margin-left: auto;
	padding-left: 8px;
	color: var(--navy);
	transition: transform 150ms var(--ease);
}

[data-look="framed"] .hero__school:hover::after {
	transform: translateX(4px);
}

[data-look="framed"] .hero__school img {
	width: 44px;
	height: 44px;
	padding: 0;
}

[data-look="framed"] .hero :where(a):focus-visible {
	outline: 3px solid var(--navy-dark);
	outline-offset: 2px;
	box-shadow: 0 0 0 5px var(--white);
}

/* Wide screens: the photo fills the frame and the card stands over the trees on the right, clear of the building and the aircraft. */
@media (min-width: 960px) {
	[data-look="framed"] .hero {
		grid-template-columns: minmax(0, 1fr) clamp(320px, 29%, 352px) 32px;
		grid-template-rows: minmax(32px, 1fr) auto auto 32px;
		height: clamp(460px, calc(100svh - 236px), 600px);
	}

	[data-look="framed"] .hero__photo {
		grid-column: 1 / -1;
		grid-row: 1 / -1;
	}

	[data-look="framed"] .hero__photo img {
		object-position: 50% 72%;
	}

	[data-look="framed"] .hero::after {
		grid-column: 2;
		grid-row: 2 / 4;
		z-index: 3;
		box-shadow: var(--shadow-raised);
	}

	[data-look="framed"] .hero__title,
	[data-look="framed"] .hero__schools {
		grid-column: 2;
		z-index: 4;
	}

	[data-look="framed"] .hero__title {
		grid-row: 2;
		padding: 28px 28px 20px;
	}

	[data-look="framed"] .hero__schools {
		grid-row: 3;
		padding: 0 28px 16px;
	}
}

/* Phones and tablets: one white frame holds the whole photo, uncut, with the title and the two schools under it. */
@media (max-width: 959px) {
	[data-look="framed"] .hero {
		padding-top: 16px;
		grid-template-rows: auto auto auto;
	}

	[data-look="framed"] .hero::after {
		grid-column: 1;
		grid-row: 1 / -1;
		border-radius: calc(var(--f-radius) + var(--f-frame));
		box-shadow: var(--shadow-raised);
	}

	[data-look="framed"] .hero > * {
		grid-column: 1;
	}

	[data-look="framed"] .hero__photo {
		grid-row: 1;
		box-shadow: none;
	}

	[data-look="framed"] .hero__title {
		grid-row: 2;
		padding: 12px 20px 16px;
	}

	[data-look="framed"] .hero__schools {
		grid-row: 3;
		padding: 0 20px 8px;
	}
}

[data-look="framed"] .site-utility {
	display: none;
}

[data-look="framed"] .site-header__row {
	justify-content: center;
	position: relative;
}

[data-look="framed"] .site-brand img {
	width: 64px;
	height: 64px;
}

[data-look="framed"] .site-nav {
	background: var(--white);
	color: var(--navy-dark);
	border-bottom: 1px solid var(--line);
}

[data-look="framed"] .site-nav .wp-block-navigation {
	justify-content: center;
}

[data-look="framed"] .site-header__main {
	border-bottom: 0;
}

[data-look="framed"] .site-nav :where(.wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content, .wp-block-navigation__responsive-container-open):focus-visible {
	outline-color: var(--navy-dark);
	box-shadow: 0 0 0 5px var(--white);
}

@media (min-width: 600px) {
	[data-look="framed"] .site-header__actions {
		position: absolute;
		right: 0;
	}
}

/* Sections: white cards on the light ground; the news cards and the calendar card stand on the ground themselves. */
[data-look="framed"] .home-section,
[data-look="framed"] .home-section--open-day,
[data-look="framed"] .home-section--contests {
	background: transparent;
}

[data-look="framed"] .home-section + .home-section {
	padding-top: 0;
}

[data-look="framed"] .home-section__inner {
	box-sizing: border-box;
	background: var(--white);
	border-radius: var(--f-radius);
	box-shadow: var(--shadow-card);
	padding: clamp(24px, 4vw, 48px);
}

[data-look="framed"] :is(.home-section--today, .home-section--news, .home-section--contests) .home-section__inner {
	background: transparent;
	box-shadow: none;
	padding: 0;
}

[data-look="framed"] .news-card,
[data-look="framed"] .contests .poster-card,
[data-look="framed"] .home-aside {
	border: 0;
	border-radius: var(--f-radius);
	box-shadow: var(--shadow-card);
}

[data-look="framed"] .news-card:hover {
	box-shadow: var(--shadow-raised);
}

[data-look="framed"] .home-aside {
	background: var(--white);
}

/* The calendar card starts level with the first news card. */
@media (min-width: 960px) {
	[data-look="framed"] .home-aside {
		margin-top: calc(1.15 * var(--wp--preset--font-size--heading-2) + 24px);
	}

	[data-look="framed"] .ranking {
		grid-template-columns: auto minmax(0, 1fr);
	}
}

/* The ranking is a slim strip, so the news start higher. */
[data-look="framed"] .home-section--ranking {
	color: var(--ink);
	padding-block: 24px var(--section);
}

[data-look="framed"] .home-section--ranking .home-section__inner {
	padding: 20px clamp(20px, 3vw, 32px);
}

[data-look="framed"] .ranking__badges img {
	height: 104px;
	padding: 0;
}

[data-look="framed"] .ranking__list li {
	border-left-color: var(--line);
	font-size: 17px;
	color: var(--muted);
}

[data-look="framed"] .ranking__list strong {
	color: var(--navy);
	font-size: clamp(36px, 3.4vw, 48px);
	margin-bottom: 4px;
}

[data-look="framed"] .open-day h2 a {
	text-decoration-thickness: 2px;
	text-underline-offset: 6px;
}

/* Open day: one large photo and two small ones beside it. */
@media (min-width: 640px) {
	[data-look="framed"] .open-day-photos {
		grid-template-columns: 2fr 1fr;
		grid-template-rows: 1fr 1fr;
	}

	[data-look="framed"] .open-day-photos img:first-child {
		grid-row: 1 / 3;
		height: 100%;
		aspect-ratio: auto;
	}
}

[data-look="framed"] .open-day-photos img {
	border-radius: var(--f-radius);
}

@media (max-width: 959px) {
	[data-look="framed"] .ranking__list li:nth-child(odd) {
		border-left: 0;
		padding-left: 0;
	}

	[data-look="framed"] .ranking {
		gap: 16px;
	}

	[data-look="framed"] .ranking__badges img {
		height: 80px;
	}

	[data-look="framed"] .ranking__list li {
		padding-block: 4px;
		font-size: 16px;
	}
}

/* ---------- Look 3: students, home page v2 from the Narwik Design System project ---------- */

/* The v2 palette, for this look only (ui_kits/website/HomeV2.jsx in the design system project). */
[data-look="students"] {
	--s-navy: #13285c;
	--s-ink: #141a2e;
	--s-muted: #55607a;
	--s-line: #dde1ea;
	--s-ground: #f4f5f8;
	--s-gold: #e8b33a;
	--students-header: 131px;
}

/* One typeface for the whole page, as in v2. */
[data-look="students"] body {
	--page-bg: var(--s-ground);
	background: var(--s-ground);
	color: var(--s-ink);
	font-family: var(--font-display);
	font-weight: 500;
}

[data-look="students"] :is(h1, h2, h3) {
	color: var(--s-ink);
}

/* The school name always sits on navy, under the photo, so it stays white at every width. */
[data-look="students"] .hero h1 {
	color: var(--white);
}

@media (min-width: 960px) {
	/* Header: a navy frame floating on the photo; inside it the quick links bar, logo, menu and a white Rekrutacja button. */
	[data-look="students"] .site-header {
		display: grid;
		grid-template-columns: auto minmax(0, 1fr) auto;
		align-items: center;
		column-gap: 20px;
		box-sizing: border-box;
		width: calc(100% - 2 * var(--gutter));
		max-width: 1100px;
		margin: 16px auto 0;
		border: 1px solid rgb(255 255 255 / 0.25);
		border-radius: 6px;
		color: var(--white);
		background: rgb(19 40 92 / 0.92);
		backdrop-filter: blur(12px);
		box-shadow: 0 12px 32px rgb(20 26 46 / 0.25);
	}

	/* On the home page the frame floats on the photo, so the photo starts at the top of the page whatever the header's height. */
	[data-look="students"] body.home .site-header {
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
	}

	/* With no photo underneath: full-width navy behind the frame, painted by border-image so the open submenus are not cut off. */
	[data-look="students"] body:not(.home) .site-header {
		border-image: linear-gradient(var(--s-navy) 0 0) fill 0 / 0 / 16px 100vmax 0;
		outline: 1px solid rgb(255 255 255 / 0.25);
		outline-offset: -1px;
		box-shadow: none;
		margin-bottom: 16px;
	}

	[data-look="students"] :is(.site-header__main, .site-header__row, .site-nav) {
		display: contents;
	}

	[data-look="students"] .site-utility {
		grid-column: 1 / -1;
		grid-row: 1;
		background: transparent;
		border-bottom: 1px solid rgb(255 255 255 / 0.2);
		padding: 4px 14px;
		font-size: 14px;
		font-weight: 600;
	}

	[data-look="students"] .site-utility > * {
		max-width: none;
	}

	[data-look="students"] .site-utility .wp-block-group {
		column-gap: 20px !important;
	}

	[data-look="students"] .site-utility a {
		display: inline-flex;
		align-items: center;
		min-height: 32px;
		color: var(--white);
		text-decoration: none;
	}

	[data-look="students"] .site-utility a:hover {
		text-decoration: underline;
	}

	[data-look="students"] .site-brand {
		grid-area: 2 / 1;
		padding: 12px 0 12px 20px;
		gap: 12px;
		color: var(--white);
	}

	[data-look="students"] .site-brand img {
		width: 48px;
		height: 48px;
		background: var(--white);
		border-radius: 50%;
		padding: 2px;
		box-sizing: border-box;
	}

	[data-look="students"] .site-brand__name {
		display: block;
		font-weight: 700;
		font-size: 16px;
		line-height: 1.2;
	}

	[data-look="students"] .site-brand__name span {
		font-weight: 700;
	}

	[data-look="students"] .site-header__actions {
		grid-area: 2 / 3;
		padding-right: 20px;
	}

	[data-look="students"] .site-header__cta {
		margin: 0;
	}

	[data-look="students"] .site-header__cta .wp-block-button__link {
		background: var(--white);
		color: var(--s-navy);
		border-radius: 4px;
		padding: 0 20px;
		font-family: var(--font-display);
		font-weight: 700;
		font-size: 16px;
	}

	[data-look="students"] .site-header__cta .wp-block-button__link:hover {
		background: var(--s-ground);
		text-decoration: underline;
	}

	[data-look="students"] .language-switcher__toggle {
		background: transparent;
		color: var(--white);
		border-color: rgb(255 255 255 / 0.45);
	}

	[data-look="students"] .language-switcher__toggle:hover {
		background: rgb(255 255 255 / 0.12);
		border-color: var(--white);
	}

	/* Menu: in the second row of the frame up to 1279 px, next to the logo from 1280 px. */
	[data-look="students"] .site-header .wp-block-navigation {
		grid-area: 3 / 1 / 4 / -1;
		justify-self: start;
		margin: 0 !important;
		padding: 0 12px 6px;
		max-width: none;
		font-size: 15px;
		font-weight: 600;
		color: var(--white);
	}

	[data-look="students"] .site-header .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content {
		padding: 0 6px;
		color: var(--white);
		text-decoration: none;
	}

	[data-look="students"] .site-header .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation__submenu-icon {
		margin-inline: -4px 4px;
	}

	[data-look="students"] .site-header .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content:hover,
	[data-look="students"] .site-header .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content[aria-expanded="true"] {
		box-shadow: inset 0 -2px 0 var(--s-gold);
	}

	/* Submenu panel: white, with a navy "[" bracket on the left. */
	[data-look="students"] .site-header .wp-block-navigation .wp-block-navigation__submenu-container {
		background: var(--white);
		color: var(--s-ink);
		border: 0;
		border-radius: 6px;
		box-shadow: 0 18px 40px rgb(20 26 46 / 0.25);
		padding: 16px 20px 16px 34px;
		font-size: 16px;
		font-weight: 600;
	}

	/* WordPress narrows an open panel to 200px with a more specific rule. */
	[data-look="students"] .site-header .wp-block-navigation .wp-block-navigation-item.has-child > .wp-block-navigation__submenu-container {
		min-width: 280px;
	}

	[data-look="students"] .site-header .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation__submenu-container::before {
		content: "";
		position: absolute;
		left: 14px;
		top: 16px;
		bottom: 16px;
		width: 10px;
		border: 2px solid var(--s-navy);
		border-right: 0;
		border-radius: 3px 0 0 3px;
		pointer-events: none;
	}

	/* The next level has no bracket, and it opens past the panel's padding instead of over it. */
	[data-look="students"] .site-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container {
		padding: 12px 20px;
	}

	[data-look="students"] .site-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container > .wp-block-navigation-item:nth-last-child(-n + 3) .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container,
	[data-look="students"] .site-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation__submenu-container:has(> :nth-child(9)) > .wp-block-navigation-item:nth-child(odd) > .wp-block-navigation__submenu-container {
		right: calc(100% + 34px);
	}

	[data-look="students"] .site-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation__submenu-container:has(> :nth-child(9)) > .wp-block-navigation-item:nth-child(even) > .wp-block-navigation__submenu-container {
		right: auto;
		left: calc(100% + 20px);
	}

	[data-look="students"] .site-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
		box-sizing: border-box;
		color: var(--s-ink);
		padding: 8px 4px;
		min-height: var(--tap);
		text-decoration: none;
	}

	[data-look="students"] .site-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
		text-decoration: underline;
	}

	[data-look="students"] .site-header :where(a, button):focus-visible {
		outline-color: var(--gold);
		box-shadow: 0 0 0 6px var(--s-ink);
	}

	[data-look="students"] .site-header .wp-block-navigation__submenu-container :where(a, button):focus-visible {
		outline-color: var(--s-navy);
		box-shadow: 0 0 0 5px var(--white);
	}

	/* Order: photo, school name and ranking on one navy band (the first screen), then the rest. */
	[data-look="students"] main.home {
		display: flex;
		flex-direction: column;
		margin-block-start: 0;
	}

	[data-look="students"] main.home > * {
		order: 3;
		margin-block: 0;
	}

	[data-look="students"] main.home > .hero {
		order: 0;
	}

	[data-look="students"] main.home > .home-section--ranking {
		order: 1;
	}

	/* The photo runs behind the header and shows the building with the 18-08 jet in front; no text on it. */
	[data-look="students"] .hero__photo {
		height: calc(var(--students-header) + clamp(340px, 100svh - 390px, 44vw));
	}

	[data-look="students"] .hero__photo img {
		object-position: 50% 78%;
	}

	[data-look="students"] .hero__title {
		padding: 36px var(--gutter) 0;
	}

	[data-look="students"] .hero__schools {
		justify-content: center;
		gap: 12px;
		padding: 24px var(--gutter) 36px;
	}

	[data-look="students"] .hero h1 {
		font-size: clamp(40px, 4vw, 56px);
		line-height: 1.05;
	}
}

@media (min-width: 960px) and (max-width: 1279px) {
	[data-look="students"] {
		--students-header: 191px;
	}
}

@media (min-width: 1280px) {
	[data-look="students"] .site-header .wp-block-navigation {
		grid-area: 2 / 2;
		justify-self: end;
		padding: 0;
	}
}

/* The navy band under the photo: address, school name, the two schools. */
[data-look="students"] .hero {
	background: var(--s-navy);
}

[data-look="students"] .hero__title {
	text-align: center;
}

[data-look="students"] .hero h1 {
	text-wrap: balance;
}

/* The address above the name: a small white box, black text. */
[data-look="students"] .hero__eyebrow {
	display: block;
	width: fit-content;
	margin: 0 auto 16px;
	padding: 6px 12px;
	border-radius: 4px;
	background: var(--white);
	color: var(--s-ink);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.14em;
}

/* The two schools as outlined pills. */
[data-look="students"] .hero__school {
	padding: 6px 18px 6px 6px;
	background: rgb(255 255 255 / 0.08);
	box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.4);
	border-radius: 6px;
	font-size: 17px;
	font-weight: 700;
	transition: background-color 200ms var(--ease), box-shadow 200ms var(--ease);
}

[data-look="students"] .hero__school:hover {
	background: rgb(255 255 255 / 0.16);
	box-shadow: inset 0 0 0 1px var(--white);
}

[data-look="students"] .hero__school img {
	width: 44px;
	height: 44px;
}

/* Ranking: on the same navy band, gold places between thin lines, the two badges at the end. */
[data-look="students"] .home-section--ranking {
	background: var(--s-navy);
	padding: 0 var(--gutter) 32px;
}

[data-look="students"] .ranking {
	box-sizing: border-box;
	max-width: 1000px;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 16px 32px;
	padding-top: 28px;
	border-top: 1px solid rgb(255 255 255 / 0.2);
}

[data-look="students"] .ranking__badges {
	grid-area: 1 / 2;
}

[data-look="students"] .home-section--ranking .ranking__badges img {
	width: auto;
	height: 80px;
	padding: 4px;
	border-radius: 4px;
}

[data-look="students"] .ranking__badges a {
	display: block;
	border-radius: 4px;
	transition: transform 200ms var(--ease);
}

[data-look="students"] .ranking__badges a:hover {
	transform: translateY(-2px);
}

[data-look="students"] .ranking__list {
	grid-area: 1 / 1;
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

[data-look="students"] .ranking__list li {
	padding: 2px 20px;
	border-left: 1px solid rgb(255 255 255 / 0.2);
	color: rgb(255 255 255 / 0.88);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.3;
}

[data-look="students"] .ranking__list li:first-child {
	border-left: 0;
	padding-left: 0;
}

[data-look="students"] .ranking__list :is(strong, .ranking__unit) {
	display: inline;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 30px;
	line-height: 1.15;
	color: var(--s-gold);
}

[data-look="students"] .ranking__where {
	display: block;
	margin-top: 2px;
}

[data-look="students"] :is(.hero, .home-section--ranking) :where(a):focus-visible {
	outline-color: var(--gold);
	box-shadow: none;
}

/* Sections: a 1000 px column as in v2, white cards without shadow. */
[data-look="students"] .home-section:not(.home-section--ranking) {
	padding-block: 56px;
}

[data-look="students"] .home-section:not(.home-section--ranking) + .home-section {
	padding-top: 0;
}

[data-look="students"] .home-section__inner {
	max-width: 1000px;
}

[data-look="students"] .home-section h2 {
	font-size: 32px;
	font-weight: 700;
	line-height: 1.2;
}

[data-look="students"] .home-section--open-day,
[data-look="students"] .home-section--contests {
	background: transparent;
}

[data-look="students"] :is(.open-day, .matura, .jobs, .contests .poster-card) {
	box-sizing: border-box;
	background: var(--white);
	border: 0;
	border-radius: 6px;
	box-shadow: none;
	padding: clamp(24px, 4vw, 40px);
}

/* Open day: the heading is the link; three photos as one large and two small. */
@media (min-width: 960px) {
	[data-look="students"] .open-day {
		grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
	}

	[data-look="students"] .matura {
		grid-template-columns: 160px minmax(0, 1fr);
	}
}

[data-look="students"] .open-day h2 {
	font-size: 30px;
	line-height: 1.2;
}

[data-look="students"] .open-day h2 a {
	color: var(--s-navy);
	text-decoration: none;
}

[data-look="students"] .open-day h2 a:hover {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}

[data-look="students"] .open-day p {
	font-size: 18px;
}

[data-look="students"] .open-day-photos img {
	border-radius: 6px;
}

@media (min-width: 640px) {
	[data-look="students"] .open-day-photos {
		grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
		gap: 8px;
	}

	[data-look="students"] .open-day-photos img:first-child {
		grid-row: span 2;
		height: 100%;
		aspect-ratio: auto;
	}
}

[data-look="students"] .jobs__icon {
	background: var(--s-navy);
	color: var(--s-gold);
}

[data-look="students"] .matura {
	border-left: 3px solid var(--s-gold);
	border-radius: 4px;
}

[data-look="students"] .matura__badge img {
	width: 160px;
}

/* Contests: one poster card per row, so the text gets a readable line length. */
[data-look="students"] .contests {
	grid-template-columns: minmax(0, 1fr);
	gap: 24px;
}

[data-look="students"] .contests .poster-card {
	grid-template-columns: 180px minmax(0, 1fr);
	gap: 32px;
}

[data-look="students"] .contests .poster-card img {
	width: 180px;
	border-color: var(--s-line);
}

[data-look="students"] .contests h2 {
	font-size: 24px;
}

[data-look="students"] .contests summary {
	font-weight: 700;
	color: var(--s-navy);
	cursor: pointer;
}

[data-look="students"] .label {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.1em;
	color: var(--s-muted);
}

[data-look="students"] .more-link a {
	font-size: 17px;
	font-weight: 700;
	color: var(--s-navy);
}

/* News: one large item (2:1 photo), under it a list of title and date. The calendar in a narrow column. */
@media (min-width: 960px) {
	[data-look="students"] .news-layout {
		grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
		column-gap: 56px;
	}

	[data-look="students"] .home-aside {
		margin-top: 0;
	}
}

[data-look="students"] .news-list .wp-block-post-template {
	grid-template-columns: minmax(0, 1fr);
	gap: 0;
}

[data-look="students"] .news-card,
[data-look="students"] .news-card:hover {
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	overflow: visible;
}

[data-look="students"] .news-card__body {
	margin-top: 0;
	padding: 14px 0;
	gap: 4px;
	border-bottom: 1px solid var(--s-line);
}

[data-look="students"] .news-card .wp-block-post-date {
	font-size: 14px;
	font-weight: 600;
	color: var(--s-muted);
}

[data-look="students"] .news-card .wp-block-post-title {
	font-weight: 700;
}

[data-look="students"] .news-card .wp-block-post-title a {
	color: var(--s-ink);
	text-decoration: none;
}

[data-look="students"] .news-card .wp-block-post-title a:hover {
	text-decoration: underline;
}

[data-look="students"] .news-list li:first-child .wp-block-post-featured-image {
	aspect-ratio: 2 / 1;
	border-radius: 6px;
	overflow: hidden;
}

[data-look="students"] .news-list li:first-child .news-card__body {
	padding-top: 16px;
	padding-bottom: 20px;
}

[data-look="students"] .news-list li:first-child .wp-block-post-title {
	font-size: 26px;
	line-height: 1.2;
}

[data-look="students"] .news-list li:first-child .wp-block-post-excerpt {
	font-size: 17px;
	color: var(--s-muted);
	font-weight: 500;
}

[data-look="students"] .news-list li:not(:first-child) :is(.wp-block-post-featured-image, .wp-block-post-excerpt) {
	display: none;
}

[data-look="students"] .news-list li:not(:first-child) .news-card__body {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 16px;
}

[data-look="students"] .news-list li:not(:first-child) .wp-block-post-title {
	font-size: 18px;
	font-weight: 600;
}

[data-look="students"] .news-list li:not(:first-child) .wp-block-post-date {
	order: 2;
	flex: none;
}

/* A slight zoom of the photo on hover. */
[data-look="students"] :is(.news-card .wp-block-post-featured-image, .open-day-photos) {
	overflow: hidden;
}

[data-look="students"] :is(.news-card .wp-block-post-featured-image img, .open-day-photos img) {
	transition: transform 450ms var(--ease);
}

[data-look="students"] .news-card:hover .wp-block-post-featured-image img,
[data-look="students"] .open-day-photos img:hover {
	transform: scale(1.04);
}

[data-look="students"] .home-aside {
	background: transparent;
	padding: 0;
	border-radius: 0;
}

[data-look="students"] .home-aside h2 {
	font-size: 32px;
	margin-bottom: 24px;
}

/* Subpages: the title in a navy block as wide as the header frame, with a gold line under it. */
[data-look="students"] .page-head {
	box-sizing: border-box;
	width: calc(100% - 2 * var(--gutter));
	max-width: 1100px;
	margin-inline: auto;
	background-color: var(--s-navy) !important;
	border-bottom: 3px solid var(--s-gold);
	padding: 28px 16px !important;
}

/* Lists of posts and wide tables end at the edges of that frame. */
[data-look="students"] body:not(.home) {
	--wp--style--global--wide-size: 1100px;
}

[data-look="students"] body:not(.home) main .wp-block-query {
	max-width: 1100px;
}

[data-look="students"] .page-head h1 {
	color: var(--white);
}

[data-look="students"] .page-head .wp-block-post-date {
	color: rgb(255 255 255 / 0.8);
}

/* The quiet search button would be navy on navy here, so it turns white. */
[data-look="students"] .page-head .wp-block-search .wp-element-button:not(.has-background) {
	color: var(--white);
	border-color: var(--white);
}

[data-look="students"] .page-head .wp-block-search .wp-element-button:not(.has-background):hover {
	color: var(--s-navy);
	background: var(--white);
}

/* In a grid of posts the text lines up with the photo, and a post without a photo gets a gold line in its place. */
[data-look="students"] .wp-block-post-template .news-card > .wp-block-group {
	padding-inline: 0 !important;
	border-bottom: 1px solid var(--s-line);
}

[data-look="students"] .wp-block-post-template .news-card:not(:has(.wp-block-post-featured-image)) {
	border-top: 3px solid var(--s-gold);
}

[data-look="students"] .site-footer {
	background: var(--s-ink) !important;
}

/* The footer's columns end at the edges of the header frame. */
[data-look="students"] .site-footer > .wp-block-columns {
	max-width: 1100px !important;
}

/* The grey label colour is too faint on the dark footer; a soft white keeps the contrast above 4.5:1. */
[data-look="students"] .site-footer .label {
	color: rgb(255 255 255 / 0.75);
}

/* ---------- Small screens: one header row for every look ---------- */

@media (max-width: 959px) {
	/* The navigation block shows its menu button only below 600 px; the theme shows it up to 959 px. */
	:root .site-header .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}

	:root .site-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}

	:root .site-header {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: center;
		background: var(--white);
		border-bottom: 1px solid var(--line);
	}

	:root .site-header > * {
		margin-block: 0;
	}

	:root .site-header__main {
		border: 0;
		padding-right: 8px;
	}

	:root .site-header .site-nav {
		align-self: stretch;
		display: flex;
		align-items: center;
		background: var(--white);
		color: var(--navy-dark);
		border: 0;
		padding: 0 max(8px, calc(var(--gutter) - 12px)) 0 0;
	}

	:root .site-header .wp-block-navigation__responsive-container-open {
		color: var(--navy-dark);
	}

	:root .site-header .wp-block-navigation__responsive-container-open:focus-visible {
		outline-color: var(--navy-dark);
		box-shadow: 0 0 0 5px var(--white);
	}

	:root .site-header__cta .wp-block-button__link {
		white-space: nowrap;
	}

	/* The open menu covers the screen: its submenus are indented lists, not floating cards. */
	:root .site-header .is-menu-open .wp-block-navigation__submenu-container {
		min-width: 0;
		margin-left: 4px;
		padding: 0 0 0 16px;
		border: 0;
		border-left: 2px solid var(--line);
		border-radius: 0;
		box-shadow: none;
	}

	/* Every submenu row is one tap target high; a label on two lines keeps some air above and below. */
	:root .site-header .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
		box-sizing: border-box;
		min-height: var(--tap);
		padding-block: 6px;
		line-height: 1.3;
	}

	:root .site-header .is-menu-open :where(a, button):focus-visible {
		outline-color: var(--navy-dark);
		box-shadow: 0 0 0 5px var(--white);
	}

	[data-look="framed"] .site-header__row {
		justify-content: space-between;
	}

	[data-look="framed"] .site-brand img {
		width: 48px;
		height: 48px;
	}
}

/* ---------- Look 3: students, phone and tablet (below 960 px), as the v2 mobile version ---------- */
/* The theme rule stays: photo on top, text under it, never text on the photo. */

@media (max-width: 959px) {
	/* Header: a navy bar, the round logo with the name, a white Rekrutacja button and a white menu button. */
	[data-look="students"] .site-header {
		background: var(--s-navy);
		border-bottom: 3px solid var(--s-gold);
	}

	[data-look="students"] .site-header__main,
	[data-look="students"] .site-header .site-nav {
		background: var(--s-navy);
		padding-block: 10px;
	}

	[data-look="students"] .site-brand {
		gap: 10px;
		color: var(--white);
	}

	[data-look="students"] .site-brand img {
		width: 44px;
		height: 44px;
		background: var(--white);
		border-radius: 50%;
		padding: 2px;
		box-sizing: border-box;
	}

	[data-look="students"] .site-brand__name {
		display: block;
		font-weight: 700;
		font-size: 14px;
		line-height: 1.2;
		color: var(--white);
	}

	[data-look="students"] .site-brand__name span {
		font-weight: 700;
	}

	[data-look="students"] .site-header__cta .wp-block-button__link {
		background: var(--white);
		color: var(--s-navy);
		border-radius: 4px;
		padding: 0 14px;
		font-weight: 700;
		font-size: 16px;
	}

	[data-look="students"] .language-switcher__toggle {
		background: transparent;
		color: var(--white);
		border-color: rgb(255 255 255 / 0.45);
	}

	[data-look="students"] .site-header .wp-block-navigation__responsive-container-open {
		min-width: var(--tap);
		min-height: var(--tap);
		justify-content: center;
		align-items: center;
		border-radius: 4px;
		background: var(--white);
		color: var(--s-navy);
	}

	[data-look="students"] .site-header :where(a, button):focus-visible,
	[data-look="students"] .site-header .wp-block-navigation__responsive-container-open:focus-visible {
		outline: 3px solid var(--gold);
		outline-offset: 2px;
		box-shadow: 0 0 0 6px var(--s-ink);
	}

	/* Open menu: a white screen, 18 px items, submenus with a navy "[" bracket. */
	[data-look="students"] .site-header .is-menu-open {
		background: var(--white) !important;
		color: var(--s-ink) !important;
	}

	[data-look="students"] .site-header .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content {
		font-size: 18px;
		font-weight: 700;
		color: var(--s-ink);
		min-height: 56px;
		display: flex;
		align-items: center;
	}

	[data-look="students"] .site-header .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item {
		border-bottom: 1px solid var(--s-line);
		width: 100%;
	}

	[data-look="students"] .site-header .is-menu-open .wp-block-navigation__submenu-container {
		position: relative !important;
		margin: 0 0 16px 4px;
		padding: 4px 0 4px 20px;
		border: 0;
	}

	[data-look="students"] .site-header .is-menu-open .wp-block-navigation__submenu-container::before {
		content: "";
		position: absolute;
		left: 0;
		top: 0;
		bottom: 0;
		width: 8px;
		border: 2px solid var(--s-navy);
		border-right: 0;
		border-radius: 3px 0 0 3px;
	}

	[data-look="students"] .site-header .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
		min-height: var(--tap);
		padding-block: 6px;
		display: flex;
		align-items: center;
		font-size: 17px;
		font-weight: 600;
		color: var(--s-ink);
	}

	[data-look="students"] .site-header .is-menu-open :where(a, button):focus-visible {
		outline: 3px solid var(--s-navy);
		outline-offset: 2px;
		box-shadow: 0 0 0 5px var(--white);
	}

	/* The whole photo (3:2, nothing cut), then one navy band: address, name, schools, ranking. */
	[data-look="students"] main.home {
		display: flex;
		flex-direction: column;
	}

	[data-look="students"] main.home > * {
		order: 3;
		margin-block: 0;
	}

	[data-look="students"] main.home > .hero {
		order: 0;
	}

	[data-look="students"] main.home > .home-section--ranking {
		order: 1;
	}

	[data-look="students"] .hero__title {
		padding: 28px var(--gutter) 0;
	}

	[data-look="students"] .hero h1 {
		font-size: clamp(32px, 8.5vw, 48px);
		line-height: 1.08;
	}

	[data-look="students"] .hero__schools {
		padding: 24px var(--gutter) 28px;
		gap: 10px;
	}

	[data-look="students"] .hero__school {
		min-height: var(--tap);
	}

	[data-look="students"] .home-section--ranking {
		padding: 0 var(--gutter) 24px;
	}

	[data-look="students"] .ranking {
		max-width: none;
		grid-template-columns: minmax(0, 1fr);
		padding-top: 24px;
	}

	[data-look="students"] .ranking__badges {
		grid-area: auto;
		order: 2;
	}

	[data-look="students"] .ranking__list {
		grid-area: auto;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		row-gap: 20px;
	}

	[data-look="students"] .ranking__list li:nth-child(odd) {
		border-left: 0;
		padding-left: 0;
	}

	[data-look="students"] .ranking__list :is(strong, .ranking__unit) {
		font-size: 26px;
	}

	/* Sections: smaller gaps, the same card layout. */
	[data-look="students"] .home-section:not(.home-section--ranking) {
		padding-block: 32px;
	}

	[data-look="students"] .home-section h2,
	[data-look="students"] .home-aside h2 {
		font-size: 28px;
	}

	[data-look="students"] .open-day h2 {
		font-size: 26px;
	}

	[data-look="students"] :is(.open-day, .matura, .jobs, .contests .poster-card) {
		padding: 24px 20px;
	}

	[data-look="students"] .matura {
		gap: 20px;
	}

	[data-look="students"] .matura__badge img {
		width: 120px;
	}

	[data-look="students"] .news-layout {
		gap: 40px;
	}

	[data-look="students"] .news-list li:first-child .wp-block-post-title {
		font-size: 22px;
	}

	[data-look="students"] .news-list li:not(:first-child) .news-card__body {
		flex-direction: column;
		gap: 2px;
	}

	[data-look="students"] .news-list li:not(:first-child) .wp-block-post-date {
		order: 0;
	}

	[data-look="students"] .page-head {
		width: 100%;
		max-width: none;
		padding: 24px var(--gutter) !important;
	}
}

/* Tablet: the two schools side by side, the ranking in one row. */
@media (min-width: 640px) and (max-width: 959px) {
	[data-look="students"] .hero__schools {
		flex-direction: row;
		justify-content: center;
	}

	[data-look="students"] .ranking__list {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	[data-look="students"] .ranking__list li:nth-child(odd):not(:first-child) {
		border-left: 1px solid rgb(255 255 255 / 0.2);
		padding-left: 20px;
	}
}

/* Phone: the open day and contest cards stack, the poster above its text. */
@media (max-width: 639px) {
	[data-look="students"] .ranking__list li {
		padding-inline: 16px 0;
	}

	[data-look="students"] .ranking__badges {
		justify-content: flex-start;
	}

	[data-look="students"] .hero__school {
		justify-content: center;
	}

	[data-look="students"] .contests .poster-card {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
	}

	[data-look="students"] .contests .poster-card img {
		width: 100%;
		max-width: 200px;
	}
}

/* Below 1280 px the right column's next level opens under its item (as in style.css). */
@media (min-width: 960px) and (max-width: 1279px) {
	[data-look="students"] .site-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation__submenu-container:has(> :nth-child(9)) > .wp-block-navigation-item:nth-child(even) > .wp-block-navigation__submenu-container {
		left: 0;
	}
}
