/**
 * Hanmac theme styles.
 *
 * Standalone: no framework, so this file carries everything, reset included.
 *
 * The composition deliberately follows the original site, measured from it
 * rather than recalled: an 850px column, the logo at full size on charcoal,
 * the class photo framed in brand orange, a large-type navigation bar with the
 * contact details at its right, and a white content column over a soft peach
 * wash. What is new is underneath that: it reflows down to a phone, meets
 * WCAG AA, and carries no dependencies.
 *
 * Written mobile first. The desktop composition takes over at 62em.
 *
 * Contents
 *   1. Tokens
 *   2. Reset
 *   3. Typography
 *   4. Layout primitives
 *   5. Accessibility helpers
 *   6. Header
 *   7. Navigation
 *   8. Content
 *   9. Footer
 *  10. Desktop layout
 *  11. Preferences and print
 */

/* ------------------------------------------------------------- 1. Tokens */

:root {
	/*
	 * Two oranges, deliberately.
	 *
	 * --hanmac-brand is the identity colour. It is used for areas and rules
	 * only - the photo frame, borders, markers - never for text, because at
	 * 2.52:1 on white it cannot be read reliably.
	 *
	 * --hanmac-accent is the same hue and saturation, darkened until it clears
	 * WCAG AA on white at 4.56:1. It is what orange text uses. The original
	 * heading orange, #e17100, measures 3.20:1, which fails at the 16px size
	 * the site's headings are actually set in.
	 */
	--hanmac-brand: #ff8000;
	--hanmac-accent: #b85d00;
	--hanmac-accent-hover: #8f4800;

	/* Links stay blue, as they were, in a shade that passes AA (6.4:1). */
	--hanmac-link: #0a58ca;
	--hanmac-link-hover: #083f91;

	--hanmac-ink: #212529;
	--hanmac-ink-soft: #545a62;
	--hanmac-ink-inverse: #ffffff;

	/* The original charcoal, used for the logo band, navigation and footer. */
	--hanmac-charcoal: #333333;
	--hanmac-charcoal-deep: #262626;

	--hanmac-surface: #ffffff;
	--hanmac-surface-sunken: #f6f2ee;
	--hanmac-border: #e4ddd6;

	/*
	 * The page wash. The original tiled a 1x656 image running from #ffdfbf to
	 * white. Reproduced as a gradient, ending just short of white so the
	 * content column stays distinct from the page all the way down.
	 */
	--hanmac-wash-top: #ffdfbf;
	--hanmac-wash-end: #fff7f0;
	--hanmac-wash-height: 41rem;

	--hanmac-focus: #0b62d6;

	/* Spacing scale */
	--space-2xs: 0.25rem;
	--space-xs: 0.5rem;
	--space-sm: 0.75rem;
	--space-md: 1rem;
	--space-lg: 1.5rem;
	--space-xl: 2rem;
	--space-2xl: 3rem;

	/* Distance from the column edge to the text. One value, so the logo
	   artwork, the navigation and the body copy share a left edge. */
	--inset: 1rem;

	--radius-sm: 5px;

	--shadow-nav: 0 2px 8px rgba(0, 0, 0, 0.2);
	--shadow-column: 0 0 0 1px rgba(90, 45, 0, 0.05), 0 0 2.5rem rgba(140, 70, 0, 0.1);
	--shadow-menu: 0 12px 32px rgba(20, 20, 20, 0.22);

	/*
	 * 850px: the original measure. In rem, not em: as an em length it resolved
	 * against the font size of whatever carried it, so the small-print bar in
	 * the footer got a 744px column and sat out of line with everything else.
	 */
	--hanmac-max-width: 53.125rem;

	/*
	 * The logo file is 1280x111, but its artwork occupies only the left 520px.
	 * It is shown at natural size, cropped to the column, exactly as the
	 * original did. Below about 600px it scales so the artwork still fits.
	 */
	--logo-height: min(111px, 18.5vw);

	--hanmac-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
		"Helvetica Neue", Arial, sans-serif, "Apple Color Emoji",
		"Segoe UI Emoji", "Segoe UI Symbol";
}

/* -------------------------------------------------------------- 2. Reset */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background-color: var(--hanmac-wash-end);
	background-image: linear-gradient(to bottom, var(--hanmac-wash-top) 0, var(--hanmac-wash-end) var(--hanmac-wash-height));
	background-repeat: no-repeat;
	color: var(--hanmac-ink);
	font-family: var(--hanmac-font);
	font-size: 1rem;
	line-height: 1.6;
}

img,
picture,
video,
canvas,
svg {
	display: block;
	max-width: 100%;
}

img {
	height: auto;
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

button {
	cursor: pointer;
}

ul,
ol {
	margin: 0;
	padding: 0;
}

/* ---------------------------------------------------------- 3. Typography */

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 var(--space-xs);
	color: var(--hanmac-ink);
	font-weight: 600;
	line-height: 1.2;
	text-wrap: balance;
}

/* The scale the site has always used, made fluid below desktop width. */
h1 { font-size: clamp(1.875rem, 1.6rem + 1.4vw, 2.5rem); }
h2 { font-size: clamp(1.625rem, 1.45rem + 0.9vw, 2rem); }
h3 { font-size: clamp(1.5rem, 1.4rem + 0.5vw, 1.75rem); }
h4 { font-size: clamp(1.3125rem, 1.25rem + 0.4vw, 1.5rem); }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
	margin: 0 0 var(--space-md);
}

a {
	color: var(--hanmac-link);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
}

a:hover {
	color: var(--hanmac-link-hover);
	text-decoration-thickness: 2px;
}

/* -------------------------------------------------- 4. Layout primitives */

/*
 * Namespaced deliberately. WordPress post_class() emits "page" on Page post
 * types and body_class() emits it too, so a wrapper class of .page had its
 * layout rules landing on <body> and on every <article> as well.
 */
.siteShell {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

/* Full-bleed horizontal band. */
.band {
	width: 100%;
}

/* The centred 850px column every band shares. It carries no padding of its
   own: what sits inside it is inset by --inset. */
.wrap {
	width: 100%;
	max-width: var(--hanmac-max-width);
	margin-right: auto;
	margin-left: auto;
}

/* --------------------------------------------- 5. Accessibility helpers */

.screen-reader-text {
	position: absolute !important;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	word-wrap: normal !important;
}

.skip-link.screen-reader-text:focus {
	z-index: 100000;
	top: var(--space-xs);
	left: var(--space-xs);
	clip: auto !important;
	clip-path: none;
	display: block;
	width: auto;
	height: auto;
	padding: var(--space-sm) var(--space-lg);
	border-radius: var(--radius-sm);
	background-color: var(--hanmac-surface);
	box-shadow: var(--shadow-menu);
	color: var(--hanmac-ink);
	font-size: 1rem;
	text-decoration: underline;
}

/*
 * One consistent focus ring. :focus-visible keeps it off mouse clicks while
 * guaranteeing it for keyboard users.
 */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
	outline: 3px solid var(--hanmac-focus);
	outline-offset: 2px;
	border-radius: 2px;
}

.band--logo a:focus-visible,
.band--nav a:focus-visible,
.navToggle:focus-visible,
.siteFooter a:focus-visible {
	outline-color: #ffffff;
}

.icon {
	display: inline-block;
	flex: 0 0 auto;
	vertical-align: -0.125em;
}

/* -------------------------------------------------------------- 6. Header */

/*
 * Charcoal band behind the logo. The original tiled a 1x111 #333 image; a flat
 * colour is the same result without the request.
 */
.band--logo {
	background-color: var(--hanmac-charcoal);
}

/*
 * The inset is reduced by the transparent margin built into the artwork, so
 * the visible mark, not the edge of the file, lines up with the text below.
 */
.siteLogo {
	display: block;
	padding-left: calc(var(--inset) - 0.6rem);
}

/*
 * Natural size, cropped rather than squeezed. Scaling the whole 1280px file
 * to the column showed the mark at under two-thirds of its original size.
 * object-fit: cover keeps the height and trims the empty right-hand canvas,
 * and anchoring to the bottom keeps the artwork sitting on the orange band
 * with nothing between them.
 */
.siteLogo img {
	width: 100%;
	height: var(--logo-height);
	object-fit: cover;
	object-position: left bottom;
}

.custom-logo-link {
	display: block;
	padding: var(--space-sm) var(--inset) 0;
}

.custom-logo {
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 111px;
}

/*
 * The 5px inset is a brand element, not incidental padding: it frames the photo
 * in brand orange and produces the orange line directly beneath the logo.
 * Matches the original theme, which set padding: 5px on this band.
 */
.band--feature {
	padding: 5px;
	background-color: var(--hanmac-brand);
	border-bottom: 1px solid var(--hanmac-charcoal);
}

/*
 * Full size from 860px up. Narrower than that the photo keeps a useful height
 * and crops at the sides, instead of shrinking to a thin strip.
 */
.featureImage {
	width: 100%;
	height: clamp(7.5rem, 34vw, 13.125rem);
	object-fit: cover;
	object-position: center;
}

/* ---------------------------------------------------------- 7. Navigation */

.band--nav {
	position: sticky;
	top: 0;
	z-index: 50;
	background-color: var(--hanmac-charcoal);
	box-shadow: var(--shadow-nav);
}

.siteNav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	/*
	 * Column gap only. The menu wrapper is a full-width flex item, so it always
	 * forms a second line - even collapsed, where it is zero height. A row gap
	 * would add dead space beneath the bar whenever the menu was shut.
	 */
	column-gap: var(--space-2xs);
	row-gap: 0;
	padding: var(--space-2xs) calc(var(--inset) - var(--space-sm));
}

.siteNav__home,
.navItems .nav-link {
	display: flex;
	align-items: center;
	min-height: 44px;
	padding: var(--space-xs) var(--space-sm);
	border-radius: var(--radius-sm);
	color: var(--hanmac-ink-inverse);
	font-size: 1.125rem;
	line-height: 1.3;
	text-decoration: none;
}

.siteNav__home:hover,
.siteNav__home:focus,
.navItems .nav-link:hover,
.navItems .nav-link:focus {
	background-color: rgba(255, 255, 255, 0.12);
	color: var(--hanmac-ink-inverse);
}

/*
 * Contact details, at the right of the bar as on the original. On a narrow
 * screen only the main number is shown, so tap-to-call stays in reach while
 * the bar is stuck to the top of the screen.
 */
.siteNav__contact {
	display: flex;
	align-items: center;
	gap: var(--space-md);
	order: 1;
	margin-left: auto;
	color: var(--hanmac-ink-inverse);
	font-size: 0.9375rem;
	line-height: 1.3;
}

.siteNav__phones {
	display: flex;
	flex-direction: column;
}

.contactLink {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	/* 44px minimum touch target: this is the primary action on a phone. */
	min-height: 44px;
	padding: 0 var(--space-xs);
	border-radius: var(--radius-sm);
	color: var(--hanmac-ink-inverse);
	text-decoration: none;
	white-space: nowrap;
}

a.contactLink:hover,
a.contactLink:focus {
	color: var(--hanmac-ink-inverse);
	text-decoration: underline;
}

/* The second number and the RTO code join in at desktop width; on a phone
   they are in the footer. */
.contactLink--secondary {
	display: none;
}

.navToggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: var(--space-xs);
	border: 1px solid rgba(255, 255, 255, 0.4);
	border-radius: var(--radius-sm);
	background: none;
	color: var(--hanmac-ink-inverse);
	font-size: 1.375rem;
}

.navToggle:hover {
	background-color: rgba(255, 255, 255, 0.12);
}

.navToggle[hidden] {
	display: none;
}

/*
 * Flex, not block: as a block the 22px glyph sits on a line box inheriting the
 * body line-height, which pushes the button past its own min-height and makes
 * it taller than the link beside it.
 */
.navToggle__open,
.navToggle__close {
	display: flex;
}

/* Swap the glyph based on the button's own ARIA state: no extra JS needed. */
.navToggle__close,
.navToggle[aria-expanded="true"] .navToggle__open {
	display: none;
}

.navToggle[aria-expanded="true"] .navToggle__close {
	display: inline-flex;
}

.siteNav__menu {
	order: 3;
	flex-basis: 100%;
}

.navItems {
	list-style: none;
}

.navItems li {
	position: relative;
	list-style: none;
}

.navItems .dropdown-item {
	display: flex;
	align-items: center;
	min-height: 44px;
	padding: var(--space-xs) var(--space-sm);
	border-radius: var(--radius-sm);
	color: var(--hanmac-ink-inverse);
	font-size: 1rem;
	line-height: 1.3;
	text-decoration: none;
}

.navItems .dropdown-item:hover,
.navItems .dropdown-item:focus {
	background-color: rgba(255, 255, 255, 0.12);
	color: var(--hanmac-ink-inverse);
}

/*
 * The current page is marked with weight and an underline in brand orange as
 * well as a tint, so the cue does not depend on colour perception alone.
 */
.navItems .current-menu-item > a,
.navItems .current_page_item > a,
.navItems [aria-current="page"] {
	background-color: rgba(255, 255, 255, 0.14);
	font-weight: 700;
	text-decoration: underline;
	text-decoration-color: var(--hanmac-brand);
	text-decoration-thickness: 2px;
	text-underline-offset: 0.3em;
}

/* The section a visitor is inside, when the current page is in its submenu. */
.navItems .current_page_parent > .nav-link,
.navItems .current-menu-ancestor > .nav-link {
	box-shadow: inset 0 -3px 0 var(--hanmac-brand);
}

.navItems .dropdown-toggle::after {
	content: "";
	width: 0.42em;
	height: 0.42em;
	margin-left: auto;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-0.15em) rotate(45deg);
	transition: transform 0.15s ease;
}

.navItems .dropdown.show > .dropdown-toggle::after {
	transform: translateY(0.1em) rotate(-135deg);
}

.dropdown-menu {
	display: none;
	list-style: none;
}

.dropdown-menu.show {
	display: block;
}

/* Narrow layout: menu collapses, submenus expand inline. */
@media (max-width: 61.9375em) {
	/*
	 * Line the button's visible edge up with the page content on the left, and
	 * the phone number's text with it on the right. The bar's own padding is
	 * sized for links whose text is inset, which these two are not.
	 */
	.navToggle {
		margin-left: var(--space-sm);
	}

	.siteNav__contact {
		margin-right: var(--space-2xs);
	}

	.js .navItems {
		display: none;
	}

	.js .navItems.is-open {
		display: block;
		padding-top: var(--space-2xs);
		padding-bottom: var(--space-xs);
	}

	/*
	 * Without scripting nothing can open a submenu, so render the whole tree
	 * expanded rather than leaving child pages unreachable.
	 */
	.no-js .navItems,
	.no-js .dropdown-menu {
		display: block;
	}

	.dropdown-menu {
		margin: 0 0 var(--space-2xs) var(--space-sm);
		padding-left: var(--space-xs);
		border-left: 2px solid var(--hanmac-brand);
	}

	.dropdown-menu .dropdown-item {
		color: rgba(255, 255, 255, 0.92);
	}
}

/* ------------------------------------------------------------- 8. Content */

/*
 * The white column. Flush beneath the navigation and running to the footer,
 * as on the original, with a soft edge so it holds against the page wash.
 */
.dvContent {
	flex: 1 0 auto;
	background-color: var(--hanmac-surface);
	box-shadow: var(--shadow-column);
}

.dvContentText {
	padding: var(--space-lg) var(--inset) var(--space-2xl);
	/* Long URLs must not force the page wider than the screen. */
	overflow-wrap: break-word;
}

.breadcrumbs {
	margin-bottom: var(--space-md);
	color: var(--hanmac-ink-soft);
	font-size: 0.875rem;
}

/* Both selectors are doubled up so they outrank the list rules that apply to
   authored content, which would otherwise indent the trail. */
.breadcrumbs .breadcrumbs__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-2xs) var(--space-xs);
	margin: 0;
	padding: 0;
	list-style: none;
}

.breadcrumbs .breadcrumbs__item {
	display: flex;
	align-items: center;
	gap: var(--space-2xs) var(--space-xs);
	margin: 0;
	list-style: none;
}

/* Separator is decorative, so it is generated rather than sitting in the DOM
   where a screen reader would announce it between every crumb. */
.breadcrumbs__item + .breadcrumbs__item::before {
	content: "/";
	color: var(--hanmac-ink-soft);
}

.pageTitle {
	margin-bottom: var(--space-lg);
	padding-bottom: var(--space-sm);
	border-bottom: 3px solid var(--hanmac-brand);
	font-size: clamp(1.625rem, 1.45rem + 0.9vw, 2rem);
}

/*
 * As on the original, the fifth-level heading is the orange one: it is what
 * the site's pages use for their section headings. The rest stay dark.
 */
.dvContentText h5 {
	color: var(--hanmac-accent);
}

.dvContentText h2,
.dvContentText h3,
.dvContentText h4,
.dvContentText h5,
.dvContentText h6 {
	margin-top: var(--space-lg);
}

/* A heading directly under another needs no extra air between them. */
.dvContentText h1 + h2,
.dvContentText h2 + h3,
.dvContentText h3 + h4,
.dvContentText h3 + h5,
.dvContentText h4 + h5,
.dvContentText h5 + h6 {
	margin-top: var(--space-xs);
}

.dvContentText > *:first-child,
.dvContentText article > *:first-child {
	margin-top: 0;
}

.dvContentText ul,
.dvContentText ol {
	margin: 0 0 var(--space-md);
	padding-left: 1.4em;
}

.dvContentText li {
	margin-bottom: var(--space-2xs);
}

.dvContentText li::marker {
	color: var(--hanmac-accent);
}

.dvContentText blockquote {
	margin: var(--space-lg) 0;
	padding: var(--space-xs) 0 var(--space-xs) var(--space-md);
	border-left: 4px solid var(--hanmac-brand);
	color: var(--hanmac-ink-soft);
}

.dvContentText hr {
	height: 0;
	margin: var(--space-lg) 0;
	border: 0;
	border-top: 1px solid var(--hanmac-border);
}

/* Wide tables scroll inside the column instead of stretching the page. */
.dvContentText table {
	display: block;
	width: 100%;
	max-width: 100%;
	margin-bottom: var(--space-md);
	overflow-x: auto;
	border-collapse: collapse;
}

.dvContentText th,
.dvContentText td {
	padding: var(--space-xs) var(--space-sm);
	border: 1px solid var(--hanmac-border);
	text-align: left;
}

.dvContentText thead th {
	background-color: var(--hanmac-surface-sunken);
}

.dvContentText iframe,
.dvContentText embed,
.dvContentText object,
.dvContentText video {
	max-width: 100%;
}

/*
 * Columns block sizing.
 *
 * WordPress only ships per-block CSS for blocks it detects, and on this site
 * the columns block stylesheet never loads: the live pages carry no
 * wp-block-column, flex-basis or flex-grow rule anywhere. The columns
 * therefore inherit only .is-layout-flex and wrap instead of sitting side by
 * side. These rules restore the intended behaviour and match core's own
 * defaults, including its 781px stacking breakpoint.
 */
.dvContentText .wp-block-columns {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: var(--space-lg);
	margin-bottom: var(--space-md);
}

.dvContentText .wp-block-column {
	flex-basis: 0;
	flex-grow: 1;
	/* Without this a long word in one column can push the row wider. */
	min-width: 0;
}

@media (max-width: 781px) {
	.dvContentText .wp-block-column {
		flex-basis: 100%;
	}
}

/*
 * WordPress alignment, caption and gallery classes.
 *
 * Core does not ship these for classic themes - they are the theme's
 * responsibility - and the live site's content uses aligncenter.
 */
.alignnone {
	margin: 0 0 var(--space-md);
}

.aligncenter,
figure.aligncenter,
.wp-caption.aligncenter {
	display: block;
	margin-right: auto;
	margin-left: auto;
}

.alignleft {
	float: left;
	margin: 0 var(--space-lg) var(--space-md) 0;
}

.alignright {
	float: right;
	margin: 0 0 var(--space-md) var(--space-lg);
}

/* Blocks that ask to break the measure still stay inside the column. */
.alignwide,
.alignfull {
	width: 100%;
	max-width: 100%;
}

.wp-caption {
	max-width: 100%;
	margin-bottom: var(--space-md);
}

.wp-caption img {
	margin: 0 auto;
}

.wp-caption-text,
.wp-element-caption,
.gallery-caption,
.dvContentText figcaption {
	padding-top: var(--space-2xs);
	color: var(--hanmac-ink-soft);
	font-size: 0.875rem;
	text-align: center;
}

/* Floated images crowd the text on a narrow screen. */
@media (max-width: 40em) {
	.alignleft,
	.alignright {
		float: none;
		display: block;
		margin: 0 auto var(--space-md);
	}
}

/* Clear floats so a float cannot escape the article it belongs to. */
.dvContentText article::after {
	content: "";
	display: block;
	clear: both;
}

.button {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: var(--space-xs) var(--space-lg);
	border-radius: var(--radius-sm);
	background-color: var(--hanmac-accent);
	color: var(--hanmac-ink-inverse);
	font-weight: 600;
	text-decoration: none;
}

.button:hover,
.button:focus {
	background-color: var(--hanmac-accent-hover);
	color: var(--hanmac-ink-inverse);
}

.pageLinks,
.pagination {
	padding-top: var(--space-md);
}

.search-form {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-xs);
	margin-bottom: var(--space-lg);
}

.search-form label {
	display: flex;
	flex: 1 1 12rem;
}

.search-form input[type="search"] {
	flex: 1 1 12rem;
	min-width: 0;
	min-height: 44px;
	padding: var(--space-xs) var(--space-sm);
	border: 1px solid #8a8580;
	border-radius: var(--radius-sm);
	background-color: var(--hanmac-surface);
}

.search-form input[type="submit"] {
	min-height: 44px;
	padding: var(--space-xs) var(--space-lg);
	border: 0;
	border-radius: var(--radius-sm);
	background-color: var(--hanmac-accent);
	color: var(--hanmac-ink-inverse);
	font-weight: 600;
	cursor: pointer;
}

.search-form input[type="submit"]:hover {
	background-color: var(--hanmac-accent-hover);
}

/* -------------------------------------------------------------- 9. Footer */

/*
 * Bookends the header: the same charcoal, opened by the same orange rule that
 * frames the photo at the top of the page.
 */
.siteFooter {
	flex-shrink: 0;
	border-top: 5px solid var(--hanmac-brand);
	background-color: var(--hanmac-charcoal);
	color: rgba(255, 255, 255, 0.86);
}

.siteFooter__inner {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-xl);
	padding: var(--space-xl) var(--inset);
}

.siteFooter__heading {
	margin-bottom: var(--space-sm);
	color: var(--hanmac-ink-inverse);
	font-size: 1.0625rem;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.siteFooter__tagline {
	margin-bottom: var(--space-sm);
}

.siteFooter p {
	margin-bottom: var(--space-xs);
}

.siteFooter a {
	color: rgba(255, 255, 255, 0.92);
	text-decoration: none;
}

.siteFooter a:hover,
.siteFooter a:focus {
	color: var(--hanmac-ink-inverse);
	text-decoration: underline;
}

.siteFooter__list,
.footerNav__list {
	list-style: none;
}

.siteFooter__list li,
.footerNav__list li {
	list-style: none;
}

.siteFooter__list a,
.footerNav__list a {
	display: inline-flex;
	/* Single line of text, so centre the icon against it. */
	align-items: center;
	gap: 0.5em;
	min-height: 44px;
	padding: var(--space-2xs) 0;
}

.siteFooter__address {
	display: inline-flex;
	/* Multi-line, so the icon tracks the first line rather than the block. */
	align-items: flex-start;
	gap: 0.5em;
	padding: var(--space-2xs) 0;
}

/*
 * Give the icon a box one line tall. The glyph keeps its aspect ratio and
 * centres inside that box, so it sits optically on the line beside it instead
 * of hugging the cap height.
 */
.siteFooter__address .icon {
	height: 1.6em;
}

.siteFooter__rto {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	margin-top: var(--space-sm);
	padding: var(--space-2xs) var(--space-xs);
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: var(--radius-sm);
	font-size: 0.9375rem;
}

.siteFooter__legal {
	background-color: var(--hanmac-charcoal-deep);
	font-size: 0.875rem;
}

.siteFooter__legal .wrap {
	padding: var(--space-md) var(--inset);
}

.siteFooter__legal p {
	margin: 0;
}

/* ------------------------------------------------------ 10. Desktop layout */

@media (min-width: 62em) {
	:root {
		--inset: 1.5rem;
	}

	/* The artwork sits 15px inside the file at full size. */
	.siteLogo {
		padding-left: calc(var(--inset) - 15px);
	}

	/* One row: Home, the menu, then the contact details at the right. */
	.siteNav {
		flex-wrap: nowrap;
		padding-top: 0;
		padding-bottom: 0;
	}

	/*
	 * Large navigation type is part of the site's character. The original set
	 * it at 25px; this is a touch under, which buys room for a fourth top
	 * level item before the bar would need a second row.
	 */
	.siteNav__home,
	.navItems .nav-link {
		min-height: 3.3125rem;
		font-size: 1.375rem;
		white-space: nowrap;
	}

	.navToggle {
		display: none;
	}

	.siteNav__menu {
		order: 0;
		flex: 1 1 auto;
		min-width: 0;
	}

	.navItems {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
	}

	.navItems .dropdown-toggle::after {
		margin-left: 0.5em;
	}

	.siteNav__contact {
		flex: 0 0 auto;
		order: 0;
		padding-right: var(--space-sm);
	}

	/* 24px each, so the two stacked numbers meet the WCAG 2.2 minimum
	   pointer target size without growing the bar. */
	.contactLink {
		min-height: 1.5rem;
		padding: 0;
	}

	.contactLink--secondary {
		display: inline-flex;
	}

	/* Pointer users get hover; navigation.js drives click and keyboard. */
	.navItems .dropdown:hover > .dropdown-menu,
	.dropdown-menu.show {
		display: block;
	}

	.dropdown-menu {
		position: absolute;
		z-index: 60;
		top: 100%;
		left: 0;
		min-width: 15rem;
		/* Some course names run to seventy characters: let those wrap rather
		   than stretch the panel off the side of the screen. */
		width: max-content;
		max-width: min(34rem, calc(100vw - 2rem));
		max-height: calc(100vh - 4.5rem);
		overflow-y: auto;
		padding: var(--space-2xs);
		border: 1px solid var(--hanmac-charcoal);
		border-top: 0;
		border-radius: 0 0 var(--radius-sm) var(--radius-sm);
		background-color: var(--hanmac-surface);
		box-shadow: var(--shadow-menu);
	}

	.dropdown-menu .dropdown-item {
		min-height: 2.5rem;
		color: var(--hanmac-ink);
		font-size: 1.0625rem;
	}

	.dropdown-menu .dropdown-item:hover,
	.dropdown-menu .dropdown-item:focus {
		background-color: #ececec;
		color: var(--hanmac-ink);
	}

	.dropdown-menu [aria-current="page"] {
		background-color: var(--hanmac-surface-sunken);
	}

	.dvContentText {
		padding-top: var(--space-xl);
	}

	/* Two columns, or three once a footer menu is assigned. */
	.siteFooter__inner {
		grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
	}
}

/* -------------------------------------------------- 11. Preferences, print */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}

	.band--nav {
		position: static;
	}
}

@media print {
	.band--nav,
	.navToggle,
	.skip-link,
	.siteFooter__list,
	.footerNav {
		display: none !important;
	}

	body {
		background: #fff;
	}

	.dvContent {
		box-shadow: none;
	}
}
