/*
Theme Name: Apiary Mag
Theme URI: https://example.com/apiary-mag
Author: Your Name
Author URI: https://example.com
Description: A fast, mobile-first magazine and blog theme with a featured post grid, category blocks, a sticky menu and Customizer controls for colours, image ratio and sidebar position.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: apiary-mag
Tags: blog, news, magazine, custom-colors, custom-logo, custom-menu, featured-images, grid-layout, left-sidebar, right-sidebar, threaded-comments, translation-ready
*/

/* =========================================================================
   Tokens
   ========================================================================= */
:root {
	--am-accent: #f5a800;
	--am-on-accent: #111111;
	--am-ink: #14202b;
	--am-ratio: 3/2;
	--am-paper: #ffffff;
	--am-surface: #f2f4f6;
	--am-line: #dde2e7;
	--am-muted: #56636f;
	--am-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Noto Serif", "Noto Serif Devanagari", serif;
	--am-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Noto Sans Devanagari", Arial, sans-serif;
	--am-container: 1200px;
	--am-hex: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--am-paper);
	color: var(--am-ink);
	font-family: var(--am-sans);
	font-size: 1rem;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

img, video, iframe, svg { max-width: 100%; height: auto; }

a { color: var(--am-ink); text-decoration-color: var(--am-accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

:focus-visible { outline: 3px solid var(--am-ink); outline-offset: 2px; }
.am-navbar :focus-visible,
.am-footer :focus-visible,
.am-topbar :focus-visible,
.am-hero__item :focus-visible { outline-color: #fff; }

[hidden] { display: none !important; }

h1, h2, h3, h4, h5, h6 { font-family: var(--am-serif); line-height: 1.2; margin: 0 0 .6em; }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important;
}
.screen-reader-text:focus, .skip-link:focus {
	background: var(--am-accent); color: var(--am-on-accent); clip: auto; clip-path: none;
	height: auto; width: auto; left: 8px; top: 8px; padding: .8rem 1.2rem; z-index: 100000; font-weight: 700; text-decoration: none;
}

.am-container { width: 100%; max-width: var(--am-container); margin-inline: auto; padding-inline: 20px; }

/* =========================================================================
   Header
   ========================================================================= */
.am-topbar { background: var(--am-ink); color: #cfd8e0; font-size: .8125rem; }
.am-topbar__inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 36px; }
.am-topmenu { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.25rem; }
.am-topmenu a { color: #cfd8e0; text-decoration: none; }
.am-topmenu a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--am-accent); }

.am-masthead { padding: 28px 0 24px; text-align: center; }
.am-brand__title { margin: 0; font: 800 clamp(2rem, 5vw, 3.25rem)/1.05 var(--am-serif); letter-spacing: -.015em; }
.am-brand__title a { text-decoration: none; }
.am-brand__tagline { margin: .5rem 0 0; color: var(--am-muted); font-size: .9375rem; }
.custom-logo-link { display: inline-block; }
.custom-logo { max-height: 90px; width: auto; }

.am-navbar { background: var(--am-ink); position: sticky; top: 0; z-index: 50; }
.admin-bar .am-navbar { top: 32px; }
@media (max-width: 782px) { .admin-bar .am-navbar { top: 46px; } }

.am-navbar__inner { display: flex; align-items: center; justify-content: space-between; min-height: 52px; }

.am-menu, .am-menu ul { list-style: none; margin: 0; padding: 0; }
.am-menu { display: flex; flex-wrap: wrap; }
.am-menu li { position: relative; }
.am-menu a {
	display: block; padding: 1rem .95rem .85rem; color: #fff; text-decoration: none;
	font-weight: 600; font-size: .9375rem; border-bottom: 3px solid transparent;
}
.am-menu a:hover,
.am-menu a:focus-visible,
.am-menu .current-menu-item > a,
.am-menu .current_page_item > a,
.am-menu .current-menu-ancestor > a { border-bottom-color: var(--am-accent); }

.am-menu .sub-menu, .am-menu .children {
	position: absolute; left: 0; top: 100%; min-width: 230px; display: none;
	background: var(--am-ink); border-top: 3px solid var(--am-accent); box-shadow: 0 14px 28px rgba(0, 0, 0, .28); z-index: 20;
}
.am-menu li:hover > .sub-menu,
.am-menu li:focus-within > .sub-menu,
.am-menu li:hover > .children,
.am-menu li:focus-within > .children { display: block; }
.am-menu .sub-menu a, .am-menu .children a { border-bottom: 0; padding: .7rem 1rem; font-weight: 500; }
.am-menu .sub-menu a:hover, .am-menu .children a:hover { background: rgba(255, 255, 255, .08); }
.am-menu .sub-menu .sub-menu, .am-menu .children .children { left: 100%; top: 0; }

.am-searchtoggle, .am-navtoggle {
	background: none; border: 0; color: #fff; cursor: pointer; font: inherit; padding: .75rem; display: inline-flex; align-items: center; gap: .6rem;
}
.am-navtoggle { display: none; font-weight: 600; padding-left: 0; }
.am-navtoggle__bars, .am-navtoggle__bars::before, .am-navtoggle__bars::after {
	display: block; width: 20px; height: 2px; background: currentColor; position: relative; content: "";
}
.am-navtoggle__bars::before { position: absolute; top: -6px; }
.am-navtoggle__bars::after { position: absolute; top: 6px; }
.am-navtoggle[aria-expanded="true"] .am-navtoggle__bars { background: transparent; }
.am-navtoggle[aria-expanded="true"] .am-navtoggle__bars::before { top: 0; transform: rotate(45deg); }
.am-navtoggle[aria-expanded="true"] .am-navtoggle__bars::after { top: 0; transform: rotate(-45deg); }

.am-searchpanel { background: var(--am-surface); border-bottom: 1px solid var(--am-line); padding: 1rem 0; }

.am-searchform { display: flex; gap: 0; max-width: 560px; }
.am-searchform__field {
	flex: 1; min-width: 0; padding: .7rem .9rem; border: 2px solid var(--am-ink); border-right: 0; border-radius: 0;
	font: inherit; background: #fff; color: var(--am-ink);
}
.am-searchform__submit {
	padding: .7rem 1.2rem; border: 2px solid var(--am-ink); background: var(--am-accent); color: var(--am-on-accent);
	font: inherit; font-weight: 700; cursor: pointer; border-radius: 0;
}
.am-searchform__submit:hover { background: var(--am-ink); color: #fff; }

@media (max-width: 860px) {
	.am-navtoggle { display: inline-flex; }
	.js .am-nav {
		display: none; position: absolute; left: 0; right: 0; top: 100%;
		background: var(--am-ink); border-top: 1px solid rgba(255, 255, 255, .15); box-shadow: 0 14px 28px rgba(0, 0, 0, .28);
		max-height: calc(100vh - 100px); overflow-y: auto;
	}
	.js .am-nav.is-open { display: block; }
	.am-menu { flex-direction: column; }
	.am-menu a { border-bottom: 0; border-left: 4px solid transparent; padding: .9rem 20px; }
	.am-menu a:hover, .am-menu a:focus-visible,
	.am-menu .current-menu-item > a, .am-menu .current_page_item > a { border-left-color: var(--am-accent); border-bottom-color: transparent; background: rgba(255, 255, 255, .06); }
	.am-menu .sub-menu, .am-menu .children { position: static; display: block; box-shadow: none; border-top: 0; background: rgba(0, 0, 0, .18); min-width: 0; }
	.am-menu .sub-menu a, .am-menu .children a { padding-left: 40px; }
	.am-menu .sub-menu .sub-menu a, .am-menu .children .children a { padding-left: 60px; }
}

/* =========================================================================
   Shared components
   ========================================================================= */
.am-main { padding-bottom: 64px; }

.am-badge {
	display: inline-block; background: var(--am-accent); color: var(--am-on-accent); text-decoration: none;
	font: 700 .75rem/1 var(--am-sans); padding: .4rem .6rem; border-radius: 2px;
}
.am-badge:hover { background: var(--am-ink); color: #fff; }

.am-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .75rem; font-size: .8125rem; color: var(--am-muted); }
.am-meta > * + * { border-left: 1px solid var(--am-line); padding-left: .75rem; }

.am-section__title {
	display: flex; align-items: center; gap: .65rem; margin: 0 0 1.5rem; padding-bottom: .7rem;
	border-bottom: 2px solid var(--am-ink); font: 700 1.5rem/1.2 var(--am-serif);
}
.am-section__title::before {
	content: ""; flex: none; width: .95rem; height: 1.05rem; background: var(--am-accent); clip-path: var(--am-hex);
}
.am-section__title a { text-decoration: none; }
.am-section__title a:hover { text-decoration: underline; text-decoration-color: var(--am-accent); }

.am-placeholder {
	display: block; width: 100%; height: 100%; background-color: var(--am-surface);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100'%3E%3Cpath d='M28 66L0 50V16L28 0l28 16v34L28 66zM28 100L0 84V50l28 16 28-16v34L28 100z' fill='none' stroke='%23cdd5dc' stroke-width='2'/%3E%3C/svg%3E");
}

.am-button {
	display: inline-block; padding: .75rem 1.3rem; background: var(--am-accent); color: var(--am-on-accent);
	font-weight: 700; text-decoration: none; border: 2px solid var(--am-ink);
}
.am-button:hover { background: var(--am-ink); color: #fff; }

/* Two-column layout */
.am-layout { margin-top: 40px; }
.am-layout--sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; align-items: start; }
.am-layout--left { grid-template-columns: 320px minmax(0, 1fr); }
.am-layout--left .am-sidebar { order: -1; }
@media (max-width: 980px) {
	.am-layout--sidebar, .am-layout--left { grid-template-columns: minmax(0, 1fr); gap: 40px; }
	.am-layout--left .am-sidebar { order: 0; }
}

/* =========================================================================
   Featured grid
   ========================================================================= */
.am-hero { padding-top: 24px; }
.am-hero__grid { display: grid; gap: 8px; height: clamp(440px, 46vw, 600px); }
.am-hero__grid--n5 { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.am-hero__grid--n4 { grid-template-columns: 3fr 2fr; grid-template-rows: repeat(3, 1fr); }
.am-hero__grid--n3 { grid-template-columns: 3fr 2fr; grid-template-rows: 1fr 1fr; }
.am-hero__grid--n2 { grid-template-columns: 1fr 1fr; }
.am-hero__grid--n1 { grid-template-columns: 1fr; }
.am-hero__grid--n5 .is-lead, .am-hero__grid--n3 .is-lead { grid-row: 1 / 3; }
.am-hero__grid--n4 .is-lead { grid-row: 1 / 4; }

.am-hero__item { position: relative; overflow: hidden; background: var(--am-ink); color: #fff; min-height: 0; }
.am-hero__media { position: absolute; inset: 0; display: block; }
.am-hero__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.am-hero__media .am-placeholder { background: linear-gradient(135deg, #2a4157, var(--am-ink)); }
.am-hero__item::before {
	content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
	background: linear-gradient(to top, rgba(8, 14, 20, .92) 0%, rgba(8, 14, 20, .4) 55%, rgba(8, 14, 20, 0) 100%);
}
.am-hero__body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 18px 20px 20px; pointer-events: none; }
.am-hero__body a, .am-hero__body .am-meta { pointer-events: auto; }
.am-hero__title { margin: .55rem 0 0; font: 700 1.0625rem/1.25 var(--am-serif); }
.is-lead .am-hero__title { font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.12; margin-bottom: .6rem; }
.am-hero__title a { color: #fff; text-decoration: none; }
.am-hero__title a:hover { text-decoration: underline; text-decoration-color: var(--am-accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.am-hero__item .am-meta { color: rgba(255, 255, 255, .82); }
.am-hero__item .am-meta > * + * { border-color: rgba(255, 255, 255, .4); }

@media (max-width: 860px) {
	.am-hero__grid { display: flex; flex-direction: column; height: auto; }
	.am-hero__item { min-height: 240px; }
	.am-hero__item.is-lead { min-height: 380px; }
}

/* =========================================================================
   Post cards and lists
   ========================================================================= */
.am-card__media { display: block; position: relative; overflow: hidden; aspect-ratio: var(--am-ratio); background: var(--am-surface); }
.am-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.am-card__title { margin: .6rem 0 .5rem; font: 700 1.375rem/1.22 var(--am-serif); }
.am-card__title a { text-decoration: none; }
.am-card__title a:hover, .am-feature__title a:hover, .am-mini__title a:hover { text-decoration: underline; text-decoration-color: var(--am-accent); text-decoration-thickness: 2px; }
.am-card__excerpt p { margin: 0 0 .8rem; color: #33414d; }
.am-card__body .am-badge { margin-bottom: .1rem; }

.am-list .am-card--list {
	display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--am-line);
}
.am-list .am-card--list:first-child { padding-top: 0; }
.am-list .am-card--list .am-card__title { margin-top: .55rem; }

.am-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 40px 28px; }
.am-card--grid .am-card__title, .am-card--compact .am-card__title { font-size: 1.25rem; }
.am-card--compact .am-card__excerpt { display: none; }
.am-card--compact .am-card__title { font-size: 1.0625rem; }

@media (max-width: 640px) {
	.am-list .am-card--list { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}

/* Category blocks */
.am-blocks { margin-top: 56px; }
.am-block + .am-block { margin-top: 56px; }
.am-block__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; }
.am-block__list { display: flex; flex-direction: column; }
.am-feature__title { margin: .7rem 0 .5rem; font: 700 1.5rem/1.2 var(--am-serif); }
.am-feature__title a { text-decoration: none; }

.am-mini { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--am-line); }
.am-mini:first-child { padding-top: 0; }
.am-mini:last-child { border-bottom: 0; }
.am-mini__media { display: block; aspect-ratio: 4/3; overflow: hidden; background: var(--am-surface); }
.am-mini__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.am-mini__title { margin: 0 0 .3rem; font: 700 1.0625rem/1.28 var(--am-serif); }
.am-mini__title a { text-decoration: none; }

@media (max-width: 700px) {
	.am-block__grid { grid-template-columns: minmax(0, 1fr); }
}

/* Pagination */
.pagination { margin-top: 32px; }
.pagination .nav-links, .comments-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.page-numbers {
	display: inline-block; min-width: 42px; padding: .55rem .9rem; border: 1px solid var(--am-line);
	text-align: center; text-decoration: none; font-weight: 600;
}
a.page-numbers:hover { border-color: var(--am-ink); }
.page-numbers.current { background: var(--am-ink); border-color: var(--am-ink); color: #fff; }
.page-numbers.dots { border-color: transparent; }

/* Archive header and empty states */
.am-archive__header { padding: 36px 0 0; }
.am-archive__title { margin: 0; font: 800 clamp(1.75rem, 4vw, 2.5rem)/1.1 var(--am-serif); }
.am-archive__title span { border-bottom: 3px solid var(--am-accent); }
.am-archive__desc { margin-top: .6rem; color: var(--am-muted); max-width: 60ch; }
.am-archive__header + .am-layout { margin-top: 32px; }
.am-none { padding: 40px 0; max-width: 560px; }
.am-none--404 { margin-inline: auto; text-align: center; padding: 72px 0; }
.am-none--404 .am-searchform { margin: 1.5rem auto; }

/* =========================================================================
   Single post and pages
   ========================================================================= */
.am-single__header { max-width: 760px; margin: 36px 0 24px; }
.am-page .am-single__header { margin-top: 48px; }
.am-single__title { margin: .8rem 0 1rem; font: 800 clamp(2rem, 4.6vw, 3.1rem)/1.1 var(--am-serif); letter-spacing: -.01em; }
.am-single__figure { margin: 0 0 32px; }
.am-single__figure img { display: block; width: 100%; height: auto; }
.am-single__figure figcaption { margin-top: .5rem; font-size: .8125rem; color: var(--am-muted); }
.am-page { max-width: 760px; margin-inline: auto; }

.entry-content { max-width: 760px; font-family: var(--am-serif); font-size: 1.1875rem; line-height: 1.75; }
.entry-content > * { margin-block: 0 1.4em; }
.entry-content h2 { font-size: 1.9rem; margin-top: 1.8em; }
.entry-content h3 { font-size: 1.5rem; margin-top: 1.6em; }
.entry-content h4 { font-size: 1.25rem; }
.entry-content a { text-decoration-thickness: 2px; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li + li { margin-top: .4em; }
.entry-content blockquote {
	margin-inline: 0; padding: .2em 0 .2em 1.4em; border-left: 5px solid var(--am-accent); font-size: 1.3rem; font-style: italic;
}
.entry-content blockquote cite { display: block; margin-top: .6em; font: 600 .875rem var(--am-sans); font-style: normal; color: var(--am-muted); }
.entry-content pre { background: var(--am-surface); padding: 1rem; overflow-x: auto; font-size: .9rem; line-height: 1.5; border-radius: 4px; }
.entry-content code { font-size: .9em; background: var(--am-surface); padding: .1em .35em; border-radius: 3px; }
.entry-content pre code { background: none; padding: 0; }
.entry-content table { width: 100%; border-collapse: collapse; font-family: var(--am-sans); font-size: .9375rem; }
.entry-content th, .entry-content td { padding: .6rem .8rem; border: 1px solid var(--am-line); text-align: left; }
.entry-content th { background: var(--am-surface); }
.entry-content hr { border: 0; border-top: 1px solid var(--am-line); margin-block: 2.5em; }
.entry-content .alignwide { max-width: 1000px; }
.entry-content .alignfull { max-width: none; }

.alignleft { float: left; margin: .3em 1.5em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.5em; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text, .wp-element-caption, .gallery-caption { font: .8125rem/1.5 var(--am-sans); color: var(--am-muted); margin-top: .4rem; }
.sticky, .bypostauthor { display: block; }

.am-pagelinks { font-family: var(--am-sans); font-weight: 600; }
.am-single__footer { max-width: 760px; margin-top: 2rem; }
.am-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; }
.am-tags a { padding: .35rem .7rem; background: var(--am-surface); font-size: .8125rem; font-weight: 600; text-decoration: none; }
.am-tags a:hover { background: var(--am-ink); color: #fff; }

.am-author { display: flex; gap: 1.25rem; align-items: flex-start; max-width: 760px; margin-top: 2.5rem; padding: 1.5rem; background: var(--am-surface); border-left: 5px solid var(--am-accent); }
.am-author__avatar { border-radius: 50%; flex: none; }
.am-author__name { margin: 0 0 .3rem; font: 700 1.125rem var(--am-serif); }
.am-author__bio { margin: 0; color: #33414d; font-size: .9375rem; }

.post-navigation { max-width: 760px; margin-top: 2.5rem; }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.post-navigation a { display: block; padding: 1rem 1.1rem; border: 1px solid var(--am-line); text-decoration: none; height: 100%; }
.post-navigation a:hover { border-color: var(--am-ink); }
.post-navigation .nav-next { text-align: right; grid-column: 2; }
.post-navigation .nav-sub { display: block; font-size: .8125rem; color: var(--am-muted); margin-bottom: .25rem; }
.post-navigation .nav-title { font: 700 1.0625rem/1.3 var(--am-serif); }

.am-related { margin-top: 56px; }
.am-related__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 720px) {
	.am-related__grid { grid-template-columns: minmax(0, 1fr); }
	.post-navigation .nav-links { grid-template-columns: 1fr; }
	.post-navigation .nav-next { grid-column: auto; }
}

/* Comments */
.am-comments { max-width: 760px; margin-top: 56px; }
.comment-list, .comment-list .children { list-style: none; margin: 0; padding: 0; }
.comment-list .children { margin-left: 2rem; }
.comment-body { padding: 1.25rem 0; border-bottom: 1px solid var(--am-line); }
.comment-meta { display: flex; flex-wrap: wrap; gap: .3rem .9rem; align-items: center; font-size: .8125rem; color: var(--am-muted); }
.comment-author { display: flex; align-items: center; gap: .7rem; font-weight: 700; color: var(--am-ink); }
.comment-author .avatar { border-radius: 50%; }
.comment-author .says { display: none; }
.comment-metadata a { color: var(--am-muted); text-decoration: none; }
.comment-content { margin-top: .6rem; }
.reply a { font-size: .8125rem; font-weight: 700; }
.comment-respond { margin-top: 2.5rem; }
.comment-reply-title { font: 700 1.5rem var(--am-serif); }
.comment-form label { display: block; font-weight: 600; font-size: .875rem; margin-bottom: .25rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: .7rem .8rem; border: 2px solid var(--am-line); font: inherit; background: #fff; color: var(--am-ink); border-radius: 0;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--am-ink); outline: 0; }
.comment-form .submit {
	padding: .8rem 1.5rem; border: 2px solid var(--am-ink); background: var(--am-accent); color: var(--am-on-accent); font: inherit; font-weight: 700; cursor: pointer;
}
.comment-form .submit:hover { background: var(--am-ink); color: #fff; }

/* =========================================================================
   Sidebar and widgets
   ========================================================================= */
.am-sidebar { min-width: 0; }
.widget { margin-bottom: 40px; font-size: .9375rem; }
.widget-title, .widget .wp-block-heading {
	position: relative; margin: 0 0 1rem; padding-bottom: .7rem; border-bottom: 1px solid var(--am-line); font: 700 1.125rem/1.2 var(--am-serif);
}
.widget-title::after, .widget .wp-block-heading::after {
	content: ""; position: absolute; left: 0; bottom: -1px; width: 3rem; height: 3px; background: var(--am-accent);
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: .6rem 0; border-bottom: 1px solid var(--am-line); }
.widget li:last-child { border-bottom: 0; }
.widget ul ul { margin-left: 1rem; }
.widget a { text-decoration: none; }
.widget a:hover { text-decoration: underline; text-decoration-color: var(--am-accent); text-decoration-thickness: 2px; }
.widget .search-form, .widget .wp-block-search__inside-wrapper { display: flex; }
.widget .wp-block-search__input, .widget .search-field { flex: 1; min-width: 0; padding: .65rem .8rem; border: 2px solid var(--am-ink); border-radius: 0; font: inherit; }
.widget .wp-block-search__button, .widget .search-submit { padding: .65rem 1rem; border: 2px solid var(--am-ink); background: var(--am-accent); color: var(--am-on-accent); font: inherit; font-weight: 700; border-radius: 0; cursor: pointer; }
.widget .wp-block-search__label { display: none; }
.widget .tagcloud a { display: inline-block; margin: 0 .3rem .4rem 0; padding: .3rem .65rem; background: var(--am-surface); font-size: .8125rem !important; }

/* =========================================================================
   Footer
   ========================================================================= */
.am-footer { background: var(--am-ink); color: #cfd8e0; margin-top: 0; }
.am-footer a { color: #fff; text-decoration-color: var(--am-accent); }
.am-footer__widgets { padding: 56px 0 24px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.am-footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 40px; }
.am-footer .widget-title, .am-footer .widget .wp-block-heading { color: #fff; border-bottom-color: rgba(255, 255, 255, .18); }
.am-footer .widget li { border-bottom-color: rgba(255, 255, 255, .12); }
.am-footer .widget .tagcloud a { background: rgba(255, 255, 255, .1); }
.am-footer__barinner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem 2rem; padding-block: 20px; font-size: .875rem; }
.am-footer__credit { margin: 0; }
.am-footermenu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }

.am-totop {
	position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
	border: 2px solid var(--am-ink); background: var(--am-accent); color: var(--am-on-accent); cursor: pointer;
}
.am-totop:hover { background: var(--am-ink); color: #fff; }

@media (prefers-reduced-motion: reduce) {
	* { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
