/*
 * Components of the output-canal child theme: layout wrapper, header, menu, the waves
 * switch, footer, page heading, pontoons, buttons, cards and the other shared parts
 * (spec 8.1.4 to 8.1.8, 8.3). Shapes use only two radii: 0 and 50%.
 */

.oc-wrap {
	max-width: calc(var(--oc-w-content) + 2 * var(--oc-gut));
	margin-inline: auto;
	padding-inline: var(--oc-gut);
}

.oc-section {
	padding-block: var(--oc-section-y);
}

/* ---------- Header (8.3, common) ---------- */

.oc-head {
	position: sticky;
	top: 0;
	z-index: 20;
	background: var(--oc-paper);
	border-bottom: var(--oc-rule);
}

.oc-head__in {
	display: flex;
	align-items: center;
	gap: 20px;
	height: var(--oc-head-h);
}

.oc-logo {
	flex: none;
	display: block;
	width: 44px;
	height: 44px;
}

.oc-logo img {
	width: 100%;
	height: 100%;
}

.oc-nav {
	margin-left: auto;
}

.oc-nav ul {
	display: flex;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.oc-nav a {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 44px;
	padding: 0 12px;
	font: 500 var(--oc-fs-nav) / 1 var(--oc-sans);
	letter-spacing: .01em;
	text-decoration: none;
}

.oc-nav a:hover {
	text-decoration: underline wavy var(--oc-pencil) 1.5px;
	text-underline-offset: 7px;
	text-decoration-skip-ink: none;
}

/* Current page: a lime dot with an ink ring under the item (8.1.1, lime use 1) */
.oc-nav a[aria-current="page"]::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 2px;
	width: 8px;
	height: 8px;
	margin-left: -4px;
	border-radius: 50%;
	background: var(--oc-lime);
	box-shadow: 0 0 0 1.5px var(--oc-ink);
}

/* Submit: a light-blue dot with an ink ring before the label (8.1.1, blue use 3) */
.oc-nav__submit a::before {
	content: "";
	flex: none;
	width: 9px;
	height: 9px;
	margin-right: 7px;
	border-radius: 50%;
	background: var(--oc-blue);
	box-shadow: 0 0 0 1.5px var(--oc-ink);
}

.oc-head__dot {
	flex: none;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--oc-pencil);
}

/* The waves switch (8.6, 2.2.2): the label says what the button does */
.oc-waves {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding: 0 2px;
	border: 0;
	background: none;
	cursor: pointer;
	font: 500 var(--oc-fs-button) / 1 var(--oc-sans);
	white-space: nowrap;
}

.oc-waves__icon {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border: var(--oc-frame);
	border-radius: 50%;
	transition: background-color var(--oc-dur-hover) var(--oc-ease-out);
}

.oc-waves:hover .oc-waves__icon {
	background: var(--oc-stone);
}

.oc-waves:active .oc-waves__icon {
	background: var(--oc-foam);
}

.oc-waves svg {
	width: 18px;
	height: 18px;
}

/* Flowing: "stop the waves" with a flat line; still: "start the waves" with a wave */
.oc-waves__start,
.oc-waves__wave,
.oc-still .oc-waves__stop,
.oc-still .oc-waves__flat {
	display: none;
}

.oc-still .oc-waves__start,
.oc-still .oc-waves__wave {
	display: inline;
}

html:not(.oc-js) .oc-waves {
	visibility: hidden;
}

.oc-menu-btn {
	display: none;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 14px;
	border: var(--oc-frame);
	border-radius: 0;
	background: var(--oc-paper);
	cursor: pointer;
	font: 500 var(--oc-fs-button) / 1 var(--oc-sans);
}

.oc-menu-btn i {
	display: block;
	width: 14px;
	height: 14px;
	border: var(--oc-frame);
	border-radius: 50%;
}

.oc-menu-btn[aria-expanded="true"] i {
	background: var(--oc-ink);
}

.oc-menu {
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	padding: 8px var(--oc-gut) 24px;
	background: var(--oc-paper);
	border-bottom: var(--oc-frame);
}

.oc-menu a {
	display: block;
	padding: 12px 0;
	border-bottom: var(--oc-rule);
	font: 400 28px / 1.1 var(--oc-serif);
	text-decoration: none;
}

.oc-menu a[aria-current="page"] {
	text-decoration: underline wavy var(--oc-ink-2) 1.5px;
	text-underline-offset: 8px;
	text-decoration-skip-ink: none;
}

@media (max-width: 1040px) {
	.oc-nav,
	.oc-head__dot {
		display: none;
	}

	.oc-waves {
		margin-left: auto;
	}

	.oc-menu-btn {
		display: inline-flex;
	}
}

@media (max-width: 760px) {
	.oc-logo {
		width: 40px;
		height: 40px;
	}

	.oc-head__in {
		gap: 14px;
	}

	.oc-waves {
		gap: 8px;
		font-size: 13px;
	}

	.oc-waves__icon {
		width: 36px;
		height: 36px;
	}
}

@media (max-width: 380px) {
	.oc-menu-btn span {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.oc-menu-btn {
		width: 44px;
		padding: 0;
		justify-content: center;
	}

	.oc-waves {
		font-size: 12px;
	}
}

/* ---------- Footer (8.3, common) ---------- */

.oc-foot {
	position: relative;
	margin-top: 12px;
	padding: 48px 0 28px;
	background: var(--oc-paper);
}

.oc-foot::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -12px;
	height: 12px;
	background: var(--oc-waterline) 0 100% / 40px 12px repeat-x;
}

.oc-foot__cols {
	display: grid;
	grid-template-columns: 1.3fr 1fr 1fr;
	gap: 32px;
}

.oc-foot__brand {
	display: flex;
	align-items: flex-start;
	gap: 16px;
}

.oc-foot__brand p {
	font-size: 15px;
	color: var(--oc-ink-2);
}

.oc-foot__name {
	display: block;
	font: 500 20px / 1.3 var(--oc-serif);
	color: var(--oc-ink);
}

.oc-foot ul {
	display: grid;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 15px;
}

.oc-foot ul a {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	text-decoration: none;
}

.oc-foot ul a:hover {
	text-decoration: underline wavy var(--oc-pencil) 1.5px;
	text-underline-offset: 5px;
	text-decoration-skip-ink: none;
}

.oc-foot__base {
	margin-top: 36px;
	padding-top: 18px;
	border-top: var(--oc-rule);
	font-size: 14px;
	color: var(--oc-pencil);
}

@media (max-width: 760px) {
	.oc-foot__cols {
		grid-template-columns: 1fr;
	}
}

/* ---------- Page heading (8.3, common) ---------- */

.oc-pagehead {
	position: relative;
	padding: clamp(18px, 3.5vw, 40px) 0 clamp(28px, 4vw, 48px);
}

.oc-pagehead::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 12px;
	background: var(--oc-waterline) 0 100% / 40px 12px repeat-x;
}

.oc-pagehead h1 {
	margin: 12px 0 14px;
}

.oc-pagehead .oc-kicker {
	margin-top: 14px;
}

.oc-intro {
	max-width: 600px;
	color: var(--oc-ink-2);
}

.oc-crumbs ol {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
	font: 400 var(--oc-fs-meta) / 1.4 var(--oc-sans);
	color: var(--oc-pencil);
}

.oc-crumbs li + li::before {
	content: "";
	display: inline-block;
	width: 5px;
	height: 5px;
	margin-right: 8px;
	border-radius: 50%;
	background: var(--oc-pencil);
	vertical-align: 2px;
}

.oc-crumbs a {
	color: var(--oc-ink);
	text-decoration: underline solid var(--oc-stone) 1px;
	text-underline-offset: 3px;
}

.oc-crumbs a:hover {
	text-decoration: underline wavy var(--oc-pencil) 1.5px;
	text-decoration-skip-ink: none;
}

/* ---------- Pontoon: the stable, opaque raft for any text over water (8.1.4, 8.2) ---------- */

.oc-raft {
	position: relative;
	padding: 26px 30px 40px;
	background: var(--oc-paper);
	border: var(--oc-frame);
}

.oc-raft::after,
.oc-card::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 12px;
	background: var(--oc-waterline) 0 100% / 40px 12px repeat-x;
	pointer-events: none;
}

@media (max-width: 760px) {
	.oc-raft {
		padding: 22px 20px 38px;
	}
}

/* ---------- Buttons (8.1.8) ---------- */

.oc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 11px 16px;
	border: var(--oc-frame);
	border-radius: 0;
	background: var(--oc-paper);
	color: var(--oc-ink);
	cursor: pointer;
	font: 500 var(--oc-fs-button) / 1 var(--oc-sans);
	letter-spacing: .01em;
	text-decoration: none;
	transition: background-color var(--oc-dur-hover) var(--oc-ease-out);
}

.oc-btn:hover {
	background: var(--oc-stone);
}

.oc-btn:active {
	background: var(--oc-foam);
}

.oc-btn:disabled,
.oc-btn[aria-disabled="true"] {
	background: var(--oc-mist);
	border-color: var(--oc-pencil);
	color: var(--oc-pencil);
	cursor: not-allowed;
}

.oc-btns {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

/* Segmented buttons (Canal and List, News and SDGs) */
.oc-seg {
	display: inline-flex;
	border: var(--oc-frame);
}

.oc-seg > * {
	display: inline-flex;
	align-items: center;
	min-height: 41px;
	padding: 0 16px;
	border: 0;
	border-radius: 0;
	background: var(--oc-paper);
	color: var(--oc-ink);
	cursor: pointer;
	font: 500 var(--oc-fs-button) / 1 var(--oc-sans);
	text-decoration: none;
	transition: background-color var(--oc-dur-hover) var(--oc-ease-out);
}

.oc-seg > * + * {
	border-left: var(--oc-frame);
}

.oc-seg > :hover {
	background: var(--oc-stone);
}

.oc-seg > :active {
	background: var(--oc-foam);
}

.oc-seg > [aria-pressed="true"],
.oc-seg > [aria-current="page"] {
	background: var(--oc-ink);
	color: var(--oc-paper);
}

/* Round controls: previous, next, page numbers */
.oc-ring {
	display: inline-grid;
	place-items: center;
	flex: none;
	width: 44px;
	height: 44px;
	padding: 0;
	border: var(--oc-frame);
	border-radius: 50%;
	background: var(--oc-paper);
	color: var(--oc-ink);
	cursor: pointer;
	font: 400 18px / 1 var(--oc-serif);
	text-decoration: none;
	transition: background-color var(--oc-dur-hover) var(--oc-ease-out);
}

.oc-ring svg {
	width: 20px;
	height: 20px;
}

.oc-ring:hover {
	background: var(--oc-stone);
}

.oc-ring:active {
	background: var(--oc-foam);
}

.oc-ring[aria-disabled="true"] {
	color: var(--oc-pencil);
	background: var(--oc-paper);
	cursor: default;
}

.oc-ring[aria-current="page"] {
	background: var(--oc-ink);
	color: var(--oc-paper);
}

.oc-count {
	min-width: 76px;
	text-align: center;
	font: 400 var(--oc-fs-count) / 1 var(--oc-serif);
	font-variant-numeric: lining-nums tabular-nums;
}

.oc-pager {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* ---------- The buoy: the main call to action (8.1.5, 8.1.8) ---------- */

.oc-buoy {
	position: relative;
	display: grid;
	place-content: center;
	justify-items: center;
	gap: 4px;
	width: 136px;
	height: 136px;
	border-radius: 50%;
	background: var(--oc-ink);
	color: var(--oc-paper);
	box-shadow: 0 0 0 6px var(--oc-paper), 0 0 0 7.5px var(--oc-ink);
	font: 600 16px / 1.15 var(--oc-sans);
	text-align: center;
	text-decoration: none;
	transition: background-color var(--oc-dur-hover) var(--oc-ease-out), translate var(--oc-dur-press) var(--oc-ease-out);
}

/* The buoy light: the light-blue accent on the call to action (8.1.1, blue use 2) */
.oc-buoy::before {
	content: "";
	position: absolute;
	top: 14px;
	left: 50%;
	width: 10px;
	height: 10px;
	margin-left: -5px;
	border-radius: 50%;
	background: var(--oc-blue);
}

.oc-buoy svg {
	width: 22px;
	height: 22px;
}

.oc-buoy:hover {
	background: var(--oc-ink-2);
}

.oc-buoy:active {
	translate: 0 2px;
}

.oc-buoy:focus-visible {
	outline: 2px solid var(--oc-ink);
	outline-offset: 12px;
	box-shadow: 0 0 0 6px var(--oc-paper), 0 0 0 7.5px var(--oc-ink), 0 0 0 12px var(--oc-paper), 0 0 0 17px var(--oc-blue);
}

/* The buoy in the dark band of the Submit page: paper body, rings in the band colours */
.oc-band .oc-buoy {
	width: 160px;
	height: 160px;
	background: var(--oc-paper);
	color: var(--oc-ink);
	box-shadow: 0 0 0 6px var(--oc-deep), 0 0 0 7.5px var(--oc-paper);
}

.oc-band .oc-buoy:hover {
	background: var(--oc-stone);
}

.oc-band .oc-buoy:focus-visible {
	outline-color: var(--oc-paper);
	box-shadow: 0 0 0 6px var(--oc-deep), 0 0 0 7.5px var(--oc-paper), 0 0 0 12px var(--oc-deep), 0 0 0 17px var(--oc-blue);
}

@media (max-width: 760px) {
	.oc-buoy {
		width: 118px;
		height: 118px;
		font-size: 15px;
	}
}

/* ---------- The dark band (Submit page only) ---------- */

.oc-band {
	padding: var(--oc-s-9) 0;
	background: var(--oc-deep);
	color: var(--oc-paper);
}

.oc-band__in {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 40px;
}

.oc-band p {
	max-width: 420px;
	color: var(--oc-foam);
}

/* ---------- Cards (8.1.8): the whole card is one link ---------- */

.oc-card {
	position: relative;
	background: var(--oc-paper);
	border: var(--oc-frame);
}

.oc-card__link {
	text-decoration: none;
}

.oc-card__link::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.oc-card__link:focus-visible {
	outline: none;
	box-shadow: none;
}

.oc-card:has(.oc-card__link:focus-visible) {
	outline: 2px solid var(--oc-ink);
	outline-offset: 4px;
	box-shadow: 0 0 0 6px var(--oc-paper), 0 0 0 9px var(--oc-blue);
}

.oc-card:hover .oc-card__link {
	text-decoration: underline wavy var(--oc-pencil) 1.5px;
	text-underline-offset: 5px;
	text-decoration-skip-ink: none;
}

.oc-card__media {
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: var(--oc-mist);
	border-bottom: var(--oc-frame);
}

.oc-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.oc-card__body {
	padding: 20px 20px 36px;
}

.oc-card__title {
	margin-top: 6px;
	font: 500 var(--oc-fs-card) / 1.2 var(--oc-serif);
	letter-spacing: 0;
}

.oc-card__excerpt {
	margin-top: 10px;
	font-size: 16px;
	line-height: 1.55;
	color: var(--oc-ink-2);
}

.oc-cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 40px 28px;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (max-width: 1040px) {
	.oc-cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 760px) {
	.oc-cards {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Rank label: lime dot with an ink ring and the award name in lower case (8.9 item 1) */
.oc-rank {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font: 600 var(--oc-fs-tag) / 1 var(--oc-sans);
	letter-spacing: .02em;
	text-transform: lowercase;
}

.oc-rank::before {
	content: "";
	flex: none;
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: var(--oc-lime);
	box-shadow: 0 0 0 1.5px var(--oc-ink);
}

/* ---------- Year buoys (/winner-collection/) ---------- */

.oc-years {
	display: flex;
	flex-wrap: wrap;
	gap: 28px 22px;
	margin: 0;
	padding: 12px 0;
	list-style: none;
}

.oc-years li:nth-child(odd) {
	translate: 0 -12px;
}

.oc-years li:nth-child(even) {
	translate: 0 12px;
}

.oc-year {
	position: relative;
	display: grid;
	place-items: center;
	width: 88px;
	height: 88px;
	border: var(--oc-frame);
	border-radius: 50%;
	background: var(--oc-paper);
	font: 400 24px / 1 var(--oc-serif);
	text-decoration: none;
	transition: background-color var(--oc-dur-hover) var(--oc-ease-out);
}

.oc-year--small {
	width: 60px;
	height: 60px;
	font-size: 17px;
}

.oc-year:hover {
	background: var(--oc-stone);
}

.oc-year[aria-current="page"] {
	background: var(--oc-ink);
	color: var(--oc-paper);
}

@media (max-width: 760px) {
	.oc-years {
		display: grid;
		grid-template-columns: repeat(3, 88px);
		justify-content: space-between;
	}
}

/* ---------- Jury ---------- */

.oc-jury {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 44px 28px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.oc-jury__item {
	position: relative;
	text-align: center;
}

.oc-portrait {
	width: min(100%, 220px);
	aspect-ratio: 1;
	margin: 8px auto 18px;
	border-radius: 50%;
	overflow: hidden;
	box-shadow: 0 0 0 6px var(--oc-paper), 0 0 0 7.5px var(--oc-ink);
	transition: box-shadow var(--oc-dur-hover) var(--oc-ease-out);
}

.oc-portrait img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 30%;
}

.oc-jury__item:hover .oc-portrait {
	box-shadow: 0 0 0 6px var(--oc-paper), 0 0 0 9px var(--oc-ink);
}

.oc-jury__name {
	font: 500 20px / 1.25 var(--oc-serif);
}

@media (max-width: 1040px) {
	.oc-jury {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 760px) {
	.oc-jury {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* ---------- Ranking table: stacked rows on small screens ---------- */

@media (max-width: 760px) {
	.oc-table--stack thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
	}

	.oc-table--stack tr {
		display: block;
		padding: 12px 0;
		border-bottom: var(--oc-rule);
	}

	.oc-table--stack td {
		display: grid;
		grid-template-columns: 9em 1fr;
		gap: 12px;
		padding: 4px 0;
		border: 0;
	}

	.oc-table--stack td::before {
		content: attr(data-label);
		font: 600 14px / 1.4 var(--oc-sans);
		text-transform: lowercase;
	}
}

/* ---------- Search form (404 and search results) ---------- */

.oc-search {
	display: flex;
	max-width: 520px;
}

.oc-search input[type="search"] {
	flex: 1;
	min-width: 0;
	border-right: 0;
}

.oc-search button {
	display: grid;
	place-items: center;
	flex: none;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: var(--oc-ink);
	color: var(--oc-paper);
	cursor: pointer;
}

.oc-search button:hover {
	background: var(--oc-ink-2);
}

.oc-search svg {
	width: 20px;
	height: 20px;
}

/* ---------- Forced colours (8.1.7): rings drawn with box-shadow become borders ---------- */

@media (forced-colors: active) {
	.oc-buoy,
	.oc-band .oc-buoy,
	.oc-portrait {
		border: 3px double CanvasText;
		box-shadow: none;
	}

	.oc-nav a[aria-current="page"]::after,
	.oc-nav__submit a::before,
	.oc-rank::before,
	.oc-buoy::before {
		border: 1.5px solid CanvasText;
		box-shadow: none;
	}

	.oc-card:has(.oc-card__link:focus-visible) {
		outline: 2px solid Highlight;
		box-shadow: none;
	}
}
