/* =========================================================================
   Alexi theme — the whole stylesheet.
   Values match what Astra was rendering on alexsmyrk.com (Sep 2026).
   ========================================================================= */

:root {
	--font: "Lexend Deca", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--text: #334155;
	--heading: #1e293b;
	--muted: #64748b;
	--link: #132e49;
	--link-hover: #1e293b;
	--bg: #ffffff;
	--surface: #f0f5fa;
	--border: #e2e8f0;
	--border-strong: #d1d5db;
	--accent: #132e49;
	--container: 1240px;
	--gutter: 20px;
	--header-h: 81px;
	--radius: 4px;
}

/* --- Reset (light) ------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
/* 1rem = 18px, as Astra set it. The ASC plugin CSS is written in rem, so this
   keeps every plugin size and spacing exactly as it was. Theme sizes are in px. */
html { font-size: 112.5%; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 18px;
	line-height: 1.65;
	color: var(--text);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
}
img, video, iframe, svg { max-width: 100%; height: auto; }
img { display: inline-block; vertical-align: middle; }
iframe { border: 0; }
figure { margin: 0 0 1.5em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }
pre, code, kbd, samp { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; }
pre { padding: 1em; background: var(--surface); overflow: auto; border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; margin: 0 0 1.5em; }
th, td { padding: 0.5em 0.75em; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { color: var(--heading); font-weight: 600; }
blockquote { margin: 0 0 1.5em; padding: 0.25em 0 0.25em 1.25em; border-left: 3px solid var(--border-strong); color: var(--muted); }

/* --- Type --------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
	font-family: var(--font);
	color: var(--heading);
	font-weight: 600;
	line-height: 1.2;
	margin: 0 0 0.6em;
}
h1 { font-size: 32px; }
h2 { font-size: 20px; }
h3 { font-size: 18px; }
h4, h5, h6 { font-size: 18px; }
p, ul, ol { margin: 0 0 1.5em; }
ul, ol { padding-left: 1.5em; }
li { margin-bottom: 0.25em; }
a { color: var(--link); text-decoration: none; }
a:hover, a:focus { color: var(--link-hover); text-decoration: none; }

/* Link hover = the plugin's "you are here" pale green (same as the current
   curriculum section and the Apartment Details / Exercise pills).
   :where() gives these rules zero specificity, so any link that styles its own
   background or padding (buttons, pills, menu items) wins without a fight. */
:where(a) {
	padding: 0.05em 0.25em;
	margin: 0 -0.25em;
	border-radius: 4px;
	box-decoration-break: clone;
	-webkit-box-decoration-break: clone;
	transition: background-color 0.15s;
}
:where(a:hover, a:focus-visible) {
	background-color: var(--asc-here-bg, #eaf3de);
	color: var(--asc-here-ink, #173404);
}
.site-title a, .main-header-menu a { padding-top: 0; padding-bottom: 0; margin: 0; border-radius: 0; }
.site-title a:hover, .site-title a:focus-visible,
.main-header-menu a:hover, .main-header-menu a:focus-visible { background: none; }

/* Curriculum sidebar: the plugin hovers clips in a grey-blue tint; use the
   same pale green as the current section instead (Alex, 25 Sep 2026). */
.asc-side-lesson a:hover,
.asc-side-section > summary:hover { background: var(--asc-here-bg, #eaf3de); }
.asc-side-lesson.is-current a:hover { background: transparent; }

/* Course title in the sidebar is a heading first: no green block, just the
   plugin's own colour change on hover. */
.asc-side-course { padding-top: 0; padding-right: 0; padding-bottom: 0; }
.asc-side-course:hover, .asc-side-course:focus-visible { background: none; color: var(--asc-green, #3c4f62); }

/* Notes pull tab: plugin hovers it in the grey-blue tint with !important. */
body .asc-notes-pull:hover,
body .asc-notes-pull:active {
	background: var(--asc-here-bg, #eaf3de) !important;
	color: var(--asc-here-ink, #173404) !important;
}

/* My Courses (asc-reports): the title h3 clips overflow for its ellipsis, which
   also clipped the hover highlight. Move the ellipsis onto the link itself. */
.asc-rep-course .asc-rep-body .asc-rep-title { overflow: visible; }
.asc-rep-col .asc-rep-title a {
	display: inline-block;
	max-width: calc(100% + 0.6em);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	vertical-align: bottom;
	padding: 0.1em 0.3em;
	margin: 0 -0.3em;
	border-radius: 6px;
}
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}
strong, b { font-weight: 600; }

/* --- Layout ------------------------------------------------------------- */
.container {
	width: 100%;
	max-width: var(--container);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--gutter);
	padding-right: var(--gutter);
}
.container-narrow { max-width: 800px; margin-left: auto; margin-right: auto; }
#page { display: flex; flex-direction: column; min-height: 100vh; }
#content { flex: 1 0 auto; }
.site-main { padding-top: 40px; padding-bottom: 60px; }
.entry-content > *:last-child { margin-bottom: 0; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
	border: 0; white-space: nowrap;
}
.skip-link { left: -9999px; top: 0; z-index: 1000; background: var(--heading); color: #fff; padding: 0.5em 1em; }
.skip-link:focus { left: 8px; top: 8px; width: auto; height: auto; clip: auto; clip-path: none; }

/* --- Header ------------------------------------------------------------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 99;
	background: var(--bg);
	border-bottom: 1px solid var(--border);
}
body.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .site-header { top: 46px; } }

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: var(--header-h);
}
.site-branding { display: flex; align-items: center; min-width: 0; }
.site-title { margin: 0; font-size: 26px; font-weight: 600; line-height: 1.2; }
.site-title a { color: var(--heading); text-decoration: none; }
.site-title a:hover { color: var(--link); }
.custom-logo-link { display: inline-flex; line-height: 0; }
.custom-logo { max-height: 48px; width: auto; }

/* Menu */
.main-navigation { display: flex; align-items: center; }
.main-header-menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 0; }
.main-header-menu li { position: relative; margin: 0; }
.main-header-menu a {
	display: inline-flex;
	align-items: center;
	padding: 0 15px;
	line-height: var(--header-h);
	color: var(--text);
	font-size: 18px;
	text-decoration: none;
}
.main-header-menu a:hover,
.main-header-menu a:focus,
.main-header-menu .current-menu-item > a,
.main-header-menu .current-menu-ancestor > a { color: var(--muted); text-decoration: none; }

/* Parent item with chevron */
.main-header-menu .menu-item-has-children > a { padding-right: 6px; }
.submenu-toggle {
	display: inline-flex; align-items: center; justify-content: center;
	width: 28px; height: 28px; margin-right: 8px;
	border: 0; background: none; color: var(--text); cursor: pointer;
	transition: transform 0.15s;
}
.submenu-toggle[aria-expanded="true"] { transform: rotate(180deg); }

/* Dropdown */
.main-header-menu .sub-menu {
	list-style: none; margin: 0; padding: 6px 0;
	position: absolute; top: 100%; left: 0;
	min-width: 240px;
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.10);
	opacity: 0; visibility: hidden; transform: translateY(4px);
	transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}
.main-header-menu .sub-menu a { display: block; padding: 8px 18px; line-height: 1.5; white-space: nowrap; }
.main-header-menu .sub-menu a:hover { background: var(--surface); color: var(--heading); }
.main-header-menu li:hover > .sub-menu,
.main-header-menu li:focus-within > .sub-menu,
.main-header-menu li.is-open > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }

/* Last item (Login / Log out): ASC Login draws its own divider, so none here */
.main-header-menu > li:last-child a { padding-right: 0; }

/* Hamburger */
.menu-toggle {
	display: none;
	flex-direction: column; justify-content: center; gap: 5px;
	width: 44px; height: 44px; padding: 8px;
	border: 1px solid var(--border-strong); border-radius: var(--radius);
	background: none; cursor: pointer;
}
.menu-toggle-bar { display: block; height: 2px; background: var(--heading); border-radius: 1px; transition: transform 0.2s, opacity 0.2s; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu (below 921px, same breakpoint Astra used) */
@media (max-width: 921px) {
	.header-inner { min-height: 64px; --header-h: 64px; }
	.site-title { font-size: 22px; }
	.menu-toggle { display: flex; }
	.main-navigation {
		display: none;
		position: absolute; left: 0; right: 0; top: 100%;
		background: var(--bg);
		border-bottom: 1px solid var(--border);
		box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
		max-height: calc(100vh - 64px); overflow-y: auto;
	}
	.main-navigation.is-open { display: block; }
	.main-header-menu { flex-direction: column; align-items: stretch; padding: 8px 0; }
	.main-header-menu li { border-top: 1px solid var(--border); }
	.main-header-menu li:first-child { border-top: 0; }
	.main-header-menu a { display: flex; justify-content: space-between; padding: 12px var(--gutter); line-height: 1.4; }
	.main-header-menu .menu-item-has-children { display: flex; flex-wrap: wrap; }
	.main-header-menu .menu-item-has-children > a { flex: 1; }
	.submenu-toggle { width: 48px; height: 48px; margin: 0; }
	.main-header-menu .sub-menu {
		position: static; width: 100%; min-width: 0;
		border: 0; border-radius: 0; box-shadow: none; padding: 0 0 4px;
		background: var(--surface);
		display: none; opacity: 1; visibility: visible; transform: none;
	}
	.main-header-menu li.is-open > .sub-menu { display: block; }
	.main-header-menu li:hover > .sub-menu:not(.is-open) { display: none; }
	.main-header-menu li.is-open:hover > .sub-menu { display: block; }
	.main-header-menu .sub-menu a { padding-left: calc(var(--gutter) + 16px); white-space: normal; }
	.main-header-menu > li:last-child a { padding-right: var(--gutter); }
}

/* --- Footer ------------------------------------------------------------- */
.site-footer {
	border-top: 1px solid var(--border);
	padding: 24px 0;
	text-align: center;
	font-size: 16px;
	color: var(--text);
}
.site-copyright { margin: 0; }

/* --- Blog bits ---------------------------------------------------------- */
.page-header { margin-bottom: 1.5em; }
.entry-header { margin-bottom: 1.5em; }
.entry-title a { color: var(--heading); }
.entry-meta { color: var(--muted); font-size: 16px; margin: -0.4em 0 1em; }
.entry-thumbnail img { border-radius: var(--radius); }
.entry-summary { padding: 1.5em 0; border-top: 1px solid var(--border); }
.entry-summary:first-child { border-top: 0; padding-top: 0; }
.entry-summary .entry-title { font-size: 22px; margin-bottom: 0.3em; }
.entry-excerpt p:last-child { margin-bottom: 0; }
.entry-footer { margin-top: 2em; font-size: 16px; color: var(--muted); }
.post-navigation { margin: 3em 0 0; padding-top: 1.5em; border-top: 1px solid var(--border); }
.post-navigation .nav-links { display: flex; justify-content: space-between; gap: 1em; }
.pagination .nav-links { display: flex; gap: 0.5em; justify-content: center; margin-top: 2em; flex-wrap: wrap; }
.page-numbers { padding: 0.4em 0.8em; border: 1px solid var(--border); border-radius: var(--radius); }
.page-numbers.current { background: var(--surface); color: var(--heading); }
.archive-description { color: var(--muted); }
.comments-area { margin-top: 3em; }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 2em; }
.comment-body { padding: 1em 0; border-top: 1px solid var(--border); }
.comment-meta { font-size: 16px; color: var(--muted); }
.comment-content p:last-child { margin-bottom: 0; }

/* --- Forms & buttons ---------------------------------------------------- */
input[type="text"], input[type="email"], input[type="url"], input[type="password"],
input[type="search"], input[type="number"], input[type="tel"], textarea, select {
	font: inherit;
	color: var(--text);
	background: var(--bg);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius);
	padding: 0.5em 0.75em;
	max-width: 100%;
}
textarea { width: 100%; }
button, input[type="submit"], input[type="button"], .wp-block-button__link, .wp-element-button {
	font: inherit;
	line-height: 1; /* not the body's 1.65 — plugin buttons (Play clip etc.) inherit this */
	cursor: pointer;
}
.search-form { display: flex; gap: 0.5em; max-width: 480px; }
.search-form label { flex: 1; }
.search-field { width: 100%; }
.search-submit, .comment-form .submit {
	background: var(--accent); color: #fff; border: 0;
	border-radius: var(--radius); padding: 0.5em 1.1em;
}
.search-submit:hover, .comment-form .submit:hover { background: var(--heading); }
.wp-block-button__link, .wp-element-button {
	background: var(--accent); color: #fff; border: 0;
	border-radius: var(--radius); padding: 0.6em 1.3em; text-decoration: none; display: inline-block;
}
.wp-block-button__link:hover, .wp-element-button:hover { background: var(--heading); color: #fff; text-decoration: none; }
.is-style-outline .wp-block-button__link { background: transparent; color: var(--accent); border: 2px solid currentColor; }

/* --- Block editor alignment (minimal) ----------------------------------- */
.alignwide { max-width: var(--container); margin-left: auto; margin-right: auto; }
.alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); }
.alignleft { float: left; margin: 0.25em 1.5em 1em 0; }
.alignright { float: right; margin: 0.25em 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-block-embed__wrapper, .wp-block-embed iframe { max-width: 100%; }
.wp-embed-responsive .wp-has-aspect-ratio .wp-block-embed__wrapper::before { content: ""; display: block; padding-top: 56.25%; }
.wp-embed-responsive .wp-has-aspect-ratio .wp-block-embed__wrapper { position: relative; }
.wp-embed-responsive .wp-has-aspect-ratio iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

/* --- ASC course/lesson pages ------------------------------------------ */
/* Keep a lane free for the Notes tab (was Astra's .site-header-primary-section-right):
   desktop menu on wide screens, the hamburger on small ones. */
body.asc-fe-page .main-navigation { padding-right: var(--asn-pull-w, 0px); }
@media (max-width: 921px) {
	body.asc-fe-page .main-navigation { padding-right: 0; }
	body.asc-fe-page .menu-toggle { margin-right: var(--asn-pull-w, 96px); }
}

/* Phones: the narrow gutter Astra used (0.54em ≈ 10px), which the plugin's
   edge-to-edge page head and video rely on. */
@media (max-width: 768px) {
	:root { --gutter: 10px; }
}

/* --- Print -------------------------------------------------------------- */
@media print {
	.site-header, .site-footer, .menu-toggle, .skip-link { display: none; }
	body { font-size: 12pt; color: #000; }
	a { color: #000; text-decoration: underline; }
}
