/*
Theme Name: Aino Kivi by Pencil
Theme URI: https://ainokivi.fi/
Author: Aino Kivi
Description: Oma teema Aino Kiven sivustolle (ohjaaja ja kirjailija). Ulkoasu on teeman omistama; tekstit ja kuvat muokataan Pencil by Rino -lisäosalla suoraan sivustolla. Ei sivunrakentajia.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: ainokivi-pencil
License: GNU General Public License v2 or later
*/

/* ---------- Tokens ---------- */
:root {
	--ak-purple: #35065f;
	--ak-ink: #000716;
	--ak-text: #42484b;
	--ak-muted: #bec4c9;
	--ak-line: #1e2428;
	--ak-light: #f7f9fc;
	--ak-white: #fff;
	--ak-fb: #557dbc;
	--ak-ig: #8a3ab9;
	--ak-font-head: "Oswald", sans-serif;
	--ak-font-body: "Open Sans", sans-serif;
	--ak-max: 1200px;
	--ak-gutter: 40px;
}

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

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--ak-white);
	color: var(--ak-text);
	font-family: var(--ak-font-body);
	font-size: 16px;
	line-height: 1.857;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--ak-purple); }
a:hover, a:focus { color: var(--ak-ink); }

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 20px;
	font-family: var(--ak-font-head);
	font-weight: 400;
	line-height: 1.3;
	color: var(--ak-purple);
	text-transform: uppercase;
}

p { margin: 0 0 1em; }

.ak-visually-hidden {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0);
	white-space: nowrap; border: 0;
}

.ak-skip-link {
	position: absolute; left: 16px; top: -60px; z-index: 1000;
	padding: 10px 16px; background: var(--ak-ink); color: var(--ak-white);
	text-decoration: none;
}
.ak-skip-link:focus { top: 16px; color: var(--ak-white); }

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

.ak-container {
	width: 100%;
	max-width: calc(var(--ak-max) + 2 * var(--ak-gutter));
	margin: 0 auto;
	padding: 0 var(--ak-gutter);
}
.ak-container--narrow { max-width: calc(900px + 2 * var(--ak-gutter)); }

.ak-section { padding: 120px 0 56px; }
.ak-section--light { background: var(--ak-light); }

.ak-h2 { font-size: 80px; line-height: 1.3; }
.ak-h3 { font-size: 48px; line-height: 1.3; }
.ak-h4 { font-size: 28px; line-height: 1.3; margin-top: 10px; }

.ak-lead {
	margin: 0 0 20px;
	font-size: 18px; font-weight: 600; line-height: 1.6;
	color: var(--ak-ink);
}

.ak-prose p { margin: 0 0 20px; }
.ak-prose p:last-child { margin-bottom: 0; }
.ak-prose ul, .ak-prose ol { margin: 0 0 20px; padding-left: 1.4em; }
.ak-prose--small { font-size: 14px; }

.ak-frame { position: relative; overflow: hidden; }
.ak-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }

.ak-split {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
}
.ak-split--top { align-items: start; }

.ak-divider {
	margin: 60px 0;
	border: 0;
	border-top: 1px solid #d5d8dc;
}

/* ---------- Links & buttons ---------- */
.ak-arrow {
	display: inline-block;
	width: 14px; height: 14px;
	margin-left: 8px;
	vertical-align: -2px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M4 12h15M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M4 12h15M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.ak-link {
	display: inline-flex;
	align-items: center;
	padding: 0 0 16px;
	border-bottom: 2px solid var(--ak-muted);
	font-size: 14px; font-weight: 700; line-height: 1;
	color: var(--ak-ink);
	text-decoration: none;
	transition: border-color .2s, color .2s;
}
.ak-link:hover, .ak-link:focus { color: var(--ak-purple); border-color: var(--ak-purple); }
.ak-link--light { color: var(--ak-white); border-color: var(--ak-line); padding-bottom: 12px; }
.ak-link--light:hover, .ak-link--light:focus { color: var(--ak-white); border-color: var(--ak-white); }

.ak-btn {
	display: inline-flex;
	align-items: center;
	padding: 16px 30px;
	border: 2px solid var(--ak-line);
	border-radius: 4px;
	font-size: 14px; font-weight: 700; line-height: 1;
	text-decoration: none;
	transition: background-color .2s, color .2s;
}
.ak-btn--outline { color: var(--ak-ink); background: transparent; }
.ak-btn--outline:hover, .ak-btn--outline:focus { background: var(--ak-ink); color: var(--ak-white); }
.ak-btn--dark { padding: 8px 12px; background: #3a3a3a; border-color: #3a3a3a; border-radius: 2px; color: var(--ak-white); font-weight: 400; font-size: 13px; }
.ak-btn--dark:hover, .ak-btn--dark:focus { background: var(--ak-purple); border-color: var(--ak-purple); color: var(--ak-white); }

/* ---------- Header ---------- */
.ak-header {
	position: relative;
	z-index: 50;
	background: var(--ak-white);
	border-bottom: 1px solid #eaeaea;
}
.ak-header__inner {
	display: flex;
	align-items: center;
	gap: 24px;
	min-height: 75px;
	padding: 0 20px;
}
.ak-brand { flex: 0 0 auto; }
.ak-brand__title {
	font-family: var(--ak-font-head);
	font-size: 35px; font-weight: 700; line-height: 1.23;
	text-transform: uppercase;
	color: var(--ak-text);
	text-decoration: none;
}
.ak-brand__title:hover, .ak-brand__title:focus { color: var(--ak-purple); }

.ak-nav { margin-left: auto; }
.ak-menu {
	display: flex; flex-wrap: wrap;
	margin: 0; padding: 0;
	list-style: none;
}
.ak-menu > li { position: relative; }
.ak-menu a {
	display: block;
	padding: 0 26px;
	font-family: var(--ak-font-head);
	font-size: 26px; line-height: 70px;
	color: rgba(0, 6, 20, .76);
	text-decoration: none;
}
.ak-menu a:hover, .ak-menu a:focus,
.ak-menu .current-menu-item > a,
.ak-menu .current-menu-ancestor > a,
.ak-menu .current_page_item > a { color: var(--ak-purple); }

.ak-menu .sub-menu {
	position: absolute; left: 0; top: 100%;
	min-width: 220px; margin: 0; padding: 8px 0;
	list-style: none;
	background: var(--ak-white);
	box-shadow: 0 6px 24px rgba(0, 7, 22, .12);
	opacity: 0; visibility: hidden;
	transition: opacity .2s;
}
.ak-menu li:hover > .sub-menu,
.ak-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; }
.ak-menu .sub-menu a { font-size: 18px; line-height: 2.4; }

.ak-nav-toggle {
	display: none;
	margin-left: auto;
	width: 44px; height: 44px;
	padding: 0;
	border: 0; background: transparent;
	color: var(--ak-ink);
	cursor: pointer;
}
.ak-nav-toggle__bars,
.ak-nav-toggle__bars::before,
.ak-nav-toggle__bars::after {
	display: block;
	width: 26px; height: 2px;
	margin: 0 auto;
	background: currentColor;
	transition: transform .2s, opacity .2s;
}
.ak-nav-toggle__bars { position: relative; }
.ak-nav-toggle__bars::before,
.ak-nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.ak-nav-toggle__bars::before { top: -8px; }
.ak-nav-toggle__bars::after { top: 8px; }
.ak-nav-open .ak-nav-toggle__bars { background: transparent; }
.ak-nav-open .ak-nav-toggle__bars::before { transform: translateY(8px) rotate(45deg); }
.ak-nav-open .ak-nav-toggle__bars::after { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Social icons ---------- */
.ak-social { display: flex; align-items: center; gap: 12px; }
.ak-social--header { flex-direction: column; gap: 6px; }
.ak-social__link {
	display: inline-flex;
	color: var(--ak-text);
	text-decoration: none;
	line-height: 1;
}
.ak-social__link .pencil-button__text {
	position: absolute; width: 1px; height: 1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap;
}
.ak-social__icon {
	display: block;
	width: 18px; height: 18px;
	background: currentColor;
	-webkit-mask: var(--ak-icon) center / contain no-repeat;
	mask: var(--ak-icon) center / contain no-repeat;
}
.ak-social__link--facebook { --ak-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M400 32H48A48 48 0 0 0 0 80v352a48 48 0 0 0 48 48h137.25V327.69h-63V256h63v-54.64c0-62.15 37-96.48 93.67-96.48 27.14 0 55.52 4.84 55.52 4.84v61h-31.27c-30.81 0-40.42 19.12-40.42 38.73V256h68.78l-11 71.69h-57.78V480H400a48 48 0 0 0 48-48V80a48 48 0 0 0-48-48z'/%3E%3C/svg%3E"); }
.ak-social__link--instagram { --ak-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M224 202.66A53.34 53.34 0 1 0 277.36 256 53.38 53.38 0 0 0 224 202.66zm124.71-41a54 54 0 0 0-30.41-30.41c-21-8.29-71-6.43-94.3-6.43s-73.25-1.93-94.31 6.43a54 54 0 0 0-30.41 30.41c-8.28 21-6.43 71.05-6.43 94.33s-1.85 73.27 6.47 94.34a54 54 0 0 0 30.41 30.41c21 8.29 71 6.43 94.31 6.43s73.24 1.93 94.3-6.43a54 54 0 0 0 30.41-30.41c8.35-21 6.43-71.05 6.43-94.33s1.92-73.26-6.43-94.33zM224 338a82 82 0 1 1 82-82 81.9 81.9 0 0 1-82 82zm85.38-148.3a19.14 19.14 0 1 1 19.13-19.14 19.1 19.1 0 0 1-19.09 19.18zM400 32H48A48 48 0 0 0 0 80v352a48 48 0 0 0 48 48h352a48 48 0 0 0 48-48V80a48 48 0 0 0-48-48zm-17.12 290c-1.29 25.63-7.14 48.34-25.85 67s-41.4 24.63-67 25.85c-26.41 1.49-105.59 1.49-132 0-25.63-1.29-48.26-7.15-67-25.85s-24.63-41.42-25.85-67c-1.49-26.42-1.49-105.61 0-132 1.29-25.63 7.07-48.34 25.85-67s41.47-24.56 67-25.78c26.41-1.49 105.59-1.49 132 0 25.63 1.29 48.33 7.15 67 25.85s24.63 41.42 25.85 67.05c1.49 26.32 1.49 105.44 0 131.88z'/%3E%3C/svg%3E"); }
.ak-social__link--rss { --ak-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M400 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zM112 416c-26.51 0-48-21.49-48-48s21.49-48 48-48 48 21.49 48 48-21.49 48-48 48zm157.533 0h-34.335c-6.011 0-11.051-4.636-11.442-10.634-5.214-80.05-69.243-143.92-149.123-149.123-5.997-.39-10.633-5.431-10.633-11.441v-34.335c0-6.535 5.468-11.777 11.994-11.425 110.546 5.974 198.997 94.536 204.964 204.964.352 6.526-4.89 11.994-11.425 11.994zm103.067 0h-34.399c-6.161 0-11.175-4.882-11.427-11.038-5.598-136.535-115.204-246.161-251.76-251.76C68.882 152.949 64 147.935 64 141.774V107.517c0-6.454 5.338-11.664 11.787-11.432 167.83 6.025 302.21 141.191 308.205 308.205.232 6.449-4.978 11.787-11.432 11.787z'/%3E%3C/svg%3E"); }

.ak-social--header .ak-social__link--facebook,
.ak-social--contact .ak-social__link--facebook { color: var(--ak-fb); }
.ak-social--header .ak-social__link--instagram,
.ak-social--contact .ak-social__link--instagram { color: var(--ak-ig); }
.ak-social--contact { margin-top: 40px; gap: 20px; }
.ak-social--contact .ak-social__icon { width: 26px; height: 26px; }

/* ---------- Homepage ---------- */
.ak-hero-slider { background: var(--ak-ink); }

.ak-about__title { margin-bottom: 20px; }
.ak-about__image { margin: 0 0 30px; aspect-ratio: 900 / 884; }

.ak-books { padding-top: 120px; }
.ak-books__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
	align-items: start;
}
.ak-book { padding: 10px; }
.ak-book__image { margin-bottom: 20px; }
.ak-book__text {
	margin: 0 0 28px;
	font-size: 18px; font-weight: 600; line-height: 1.6;
	color: var(--ak-ink);
}
.ak-book__title {
	margin: 0 0 28px;
	font-size: 22px; font-weight: 700; line-height: 1.25;
}

.ak-recent { padding: 120px 0 80px; }
.ak-recent__head {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
	align-items: end;
}
.ak-recent__head .ak-h2 { margin-bottom: 20px; }
.ak-recent__action { text-align: right; }

.ak-tiles { background: var(--ak-ink); }
.ak-tiles__row { display: grid; }
.ak-tiles__row--2 { grid-template-columns: 1fr 1fr; }
.ak-tiles__row--3a { grid-template-columns: 316fr 434fr 515fr; }
.ak-tiles__row--3b { grid-template-columns: 2fr 1fr 1fr; }

.ak-tile {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: 445px;
	overflow: hidden;
	background: #050505;
}
.ak-tile__media { position: absolute; inset: 0; }
.ak-tile__media img {
	display: block;
	width: 100%; height: 100%;
	object-fit: cover;
	transition: transform .6s ease;
}
.ak-tile:hover .ak-tile__media img { transform: scale(1.04); }
.ak-tile::after {
	content: "";
	position: absolute; inset: 0;
	background: linear-gradient(to top, rgba(0, 7, 22, .55) 0%, rgba(0, 7, 22, 0) 45%);
	pointer-events: none;
}
.ak-tile__body {
	position: relative; z-index: 1;
	padding: 40px;
}
.ak-tile__title {
	margin: 0 0 24px;
	font-size: 24px; font-weight: 700; line-height: 1.2;
	color: var(--ak-white);
}

.ak-quotes { padding: 120px 0; }
.ak-quotes .ak-split { gap: 160px; }
.ak-quote { margin: 0; }
.ak-quote .ak-h2 { margin-bottom: 20px; }
.ak-quote__text { margin: 0 0 16px; padding: 0; border: 0; }
.ak-quote__text p {
	margin: 0;
	font-size: 20px; font-weight: 600; line-height: 1.6;
	color: var(--ak-ink);
}
.ak-quote__source {
	font-family: var(--ak-font-head);
	font-size: 16px; font-weight: 700; line-height: 1.5;
	text-transform: uppercase;
	color: var(--ak-text);
}

/* ---------- Page hero ---------- */
.ak-page-hero { padding: 120px 0 80px; background: var(--ak-white); }
.ak-page-hero__title { margin: 0; font-size: 104px; line-height: 1.2; }

/* ---------- Listing (masonry cards) ---------- */
/* Row-major masonry: theme.js sets each card's row span. */
.ak-masonry {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	grid-auto-rows: 4px;
	column-gap: 20px;
	align-items: start;
}
.ak-card { background: var(--ak-white); }
.ak-masonry .ak-card { margin-bottom: 20px; }
.ak-card__media a { display: block; }
.ak-card__media img { display: block; width: 100%; height: auto; }
.ak-card__body { padding: 20px 20px 24px; }
.ak-card__term {
	display: inline-block;
	margin-bottom: 12px;
	padding: 2px 8px;
	background: #e9e9e9;
	font-size: 12px; line-height: 1.6;
	color: var(--ak-text);
	text-decoration: none;
}
.ak-card__title { margin: 0 0 8px; font-size: 34px; line-height: 1.2; }
.ak-card__title a { color: var(--ak-purple); text-decoration: none; }
.ak-card__title a:hover, .ak-card__title a:focus { color: var(--ak-ink); }
.ak-card__meta {
	display: flex; flex-wrap: wrap; gap: 14px;
	margin-bottom: 12px;
	font-size: 11px; color: #8a8f93;
}
.ak-card__meta .ak-icon { width: 11px; height: 11px; margin-right: 4px; vertical-align: -1px; }
.ak-card__excerpt { margin: 0 0 18px; font-size: 13px; line-height: 1.7; }
.ak-icon { display: inline-block; width: 1em; height: 1em; }

.ak-pagination { margin-top: 40px; text-align: center; }
.ak-pagination .page-numbers {
	display: inline-block;
	min-width: 40px; margin: 0 3px; padding: 6px 10px;
	border: 1px solid #d5d8dc;
	color: var(--ak-ink); text-decoration: none;
}
.ak-pagination .page-numbers.current { background: var(--ak-purple); border-color: var(--ak-purple); color: var(--ak-white); }

/* ---------- Writings / contact ---------- */
.ak-writings .ak-h3 { margin-bottom: 40px; }
.ak-writings__cover { max-width: 600px; margin-bottom: 30px; aspect-ratio: 600 / 897; }
.ak-contact { min-height: 50vh; }
.ak-contact__list { margin: 20px 0 0; padding: 0; list-style: none; font-size: 18px; color: var(--ak-ink); }

/* ---------- Single post ---------- */
.ak-single-wrap { padding: 4em 0; background: var(--ak-light); }
.ak-single {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: 40px;
	align-items: start;
}
.ak-article { padding: 60px; background: var(--ak-white); }
.ak-article__thumb { display: block; width: 100%; height: auto; margin-bottom: 30px; }
.ak-article__title { margin: 0 0 4px; font-size: 30px; line-height: 1.3; }
.ak-article__meta { margin: 0 0 30px; font-size: 14px; }

.ak-content { overflow-wrap: break-word; }
.ak-content > *:last-child { margin-bottom: 0; }
.ak-content h2 { font-size: 36px; }
.ak-content h3 { font-size: 28px; }
.ak-content h4 { font-size: 22px; }
.ak-content figure { margin: 0 0 1.5em; }
.ak-content img { height: auto; }
.ak-content iframe { max-width: 100%; }
.ak-content blockquote { margin: 0 0 1.5em; padding-left: 20px; border-left: 4px solid var(--ak-purple); }
.ak-content .alignleft { float: left; margin: 0 20px 20px 0; }
.ak-content .alignright { float: right; margin: 0 0 20px 20px; }
.ak-content .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.ak-content .gallery { display: grid; gap: 16px; margin: 0 0 1.5em; }
.ak-content .gallery-columns-1 { grid-template-columns: 1fr; }
.ak-content .gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
.ak-content .gallery-columns-3 { grid-template-columns: repeat(3, 1fr); }
.ak-content .gallery-columns-4 { grid-template-columns: repeat(4, 1fr); }
.ak-content .gallery-item { margin: 0; }
.ak-content .gallery-item img { display: block; width: 100%; height: auto; }
.ak-content .wp-video, .ak-content .ak-embed { margin-bottom: 1.5em; }

.ak-sidebar { padding: 40px 30px; background: var(--ak-white); font-size: 14px; }
.ak-widget { margin-bottom: 40px; }
.ak-widget:last-child { margin-bottom: 0; }
.ak-widget__title { font-size: 20px; margin-bottom: 14px; }
.ak-sidebar ul { margin: 0; padding: 0; list-style: none; }
.ak-sidebar li { margin: 0 0 8px; line-height: 1.5; }
.ak-sidebar a { color: var(--ak-text); text-decoration: none; }
.ak-sidebar a:hover, .ak-sidebar a:focus { color: var(--ak-purple); }

/* ---------- Footer ---------- */
.ak-footer { background: var(--ak-ink); color: var(--ak-muted); }
.ak-footer__top { padding: 80px 0 60px; }
.ak-footer__grid {
	display: grid;
	grid-template-columns: 1fr 3fr;
	gap: 40px;
}
.ak-footer .ak-widget__title {
	font-size: 40px; line-height: 1.5;
	color: var(--ak-white);
	margin-bottom: 20px;
}
.ak-footer .ak-widget { margin-bottom: 20px; font-size: 14px; }
.ak-footer a { color: var(--ak-muted); }
.ak-footer a:hover, .ak-footer a:focus { color: var(--ak-white); }
.ak-footer ul { margin: 0; padding: 0; list-style: none; }
.ak-social--footer { gap: 30px; margin-top: 10px; }
.ak-social--footer .ak-social__link { color: var(--ak-muted); }
.ak-social--footer .ak-social__link:hover,
.ak-social--footer .ak-social__link:focus { color: var(--ak-white); }
.ak-social--footer .ak-social__icon { width: 25px; height: 25px; }
.ak-footer__bottom { padding: 20px 0; border-top: 1px solid rgba(255, 255, 255, .12); text-align: center; }
.ak-footer__copy { margin: 0; font-size: 14px; }

.ak-to-top {
	position: fixed; right: 30px; bottom: 30px; z-index: 40;
	display: flex; align-items: center; justify-content: center;
	width: 32px; height: 32px;
	background: var(--ak-ink);
	color: var(--ak-white);
	opacity: 0; visibility: hidden;
	transition: opacity .2s;
}
.ak-to-top.is-visible { opacity: 1; visibility: visible; }
.ak-to-top .ak-icon { width: 16px; height: 16px; }
.ak-to-top:hover, .ak-to-top:focus { background: var(--ak-purple); color: var(--ak-white); }

/* Managed regions should not change layout. */
.ak-brand .pencil-managed-region,
.ak-nav .pencil-managed-region { display: contents; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
	.ak-menu a { padding: 0 16px; font-size: 22px; }
	.ak-h2 { font-size: 64px; }
	.ak-page-hero__title { font-size: 84px; }
	.ak-quotes .ak-split { gap: 80px; }
}

@media (max-width: 1024px) {
	:root { --ak-gutter: 24px; }
	.ak-section, .ak-books, .ak-recent { padding: 80px 0 48px; }
	.ak-quotes { padding: 80px 0; }
	.ak-page-hero { padding: 80px 0 48px; }
	.ak-h2 { font-size: 52px; }
	.ak-h3 { font-size: 40px; }
	.ak-page-hero__title { font-size: 64px; }
	.ak-masonry { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ak-single { grid-template-columns: 1fr; }
	.ak-article { padding: 32px; }
	.ak-tile { min-height: 360px; }

	.ak-nav-toggle { display: block; }
	.ak-header__inner { flex-wrap: wrap; padding: 10px 20px; }
	.ak-brand__title { font-size: 26px; }
	.ak-social--header { flex-direction: row; order: 2; margin-left: 12px; }
	.ak-nav-toggle { order: 3; margin-left: 8px; }
	.ak-nav {
		order: 4;
		flex: 0 0 100%;
		margin: 0;
		display: none;
	}
	.ak-nav-open .ak-nav { display: block; }
	.ak-menu { flex-direction: column; padding: 8px 0 16px; }
	.ak-menu a { padding: 0; font-size: 22px; line-height: 2.2; }
	.ak-menu .sub-menu { position: static; opacity: 1; visibility: visible; box-shadow: none; padding: 0 0 0 16px; }
	.ak-brand { margin-right: auto; min-width: 0; }
}

@media (max-width: 420px) {
	/* Social links stay in the footer; keep the header on one row. */
	.ak-social--header { display: none; }
}

@media (max-width: 767px) {
	.ak-split,
	.ak-recent__head,
	.ak-books__grid,
	.ak-footer__grid,
	.ak-tiles__row--2,
	.ak-tiles__row--3a,
	.ak-tiles__row--3b { grid-template-columns: 1fr; }
	.ak-split__col[aria-hidden="true"] { display: none; }
	.ak-recent__action { text-align: left; }
	.ak-quotes .ak-split { gap: 48px; }
	.ak-h2 { font-size: 40px; }
	.ak-h3 { font-size: 32px; }
	.ak-page-hero__title { font-size: 48px; }
	.ak-masonry { grid-template-columns: minmax(0, 1fr); }
	.ak-tile { min-height: 300px; }
	.ak-tile__body { padding: 24px; }
	.ak-article { padding: 20px; }
	.ak-footer .ak-widget__title { font-size: 32px; }
	.ak-brand__title { font-size: 21px; }
	.ak-header__inner { gap: 8px; padding: 10px 16px; flex-wrap: wrap; }
	.ak-social--header { margin-left: 0; gap: 10px; }
	.ak-content .gallery-columns-3,
	.ak-content .gallery-columns-4 { grid-template-columns: repeat(2, 1fr); }
}
