/* ==========================================================================
   Header layout, animations, inner pages (single, search, archive, 404, pages).
   Uses the tokens defined in style.css.
   ========================================================================== */

/* ---------- Header: logo left · search centre · actions right ---------- */
.site-header__bar { display: grid; grid-template-columns: 1fr minmax(240px, 460px) 1fr; gap: 16px; align-items: center; }
.site-header__brand { grid-column: 1; justify-self: start; display: flex; align-items: center; gap: 12px; min-width: 0; }
.site-header__bar .search-form { grid-column: 2; }
.header-actions { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 12px; margin: 0; }

/* Hamburger button (tablet + mobile only) */
.nav-toggle { display: none; width: 42px; height: 42px; flex: none; padding: 0; border: 1px solid var(--c-border); border-radius: 50%; background: transparent; color: inherit; cursor: pointer; align-items: center; justify-content: center; transition: background .2s, border-color .2s; }
.nav-toggle:hover { background: var(--c-bg-soft); border-color: var(--c-primary); }
.nav-toggle__bars { position: relative; display: block; width: 18px; height: 14px; }
.nav-toggle__bars i { position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: currentColor; transition: transform .25s, opacity .2s, top .25s; }
.nav-toggle__bars i:nth-child(1) { top: 0; } .nav-toggle__bars i:nth-child(2) { top: 6px; } .nav-toggle__bars i:nth-child(3) { top: 12px; }
.nav-toggle[aria-expanded="true"] i:nth-child(1) { top: 6px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] i:nth-child(3) { top: 6px; transform: rotate(-45deg); }

/* Slide-in menu */
.mobile-nav { position: fixed; inset: 0; z-index: 100; visibility: hidden; pointer-events: none; transition: visibility 0s .3s; }
.mobile-nav.is-open { visibility: visible; pointer-events: auto; transition-delay: 0s; }
.mobile-nav__backdrop { position: absolute; inset: 0; background: rgba(15, 25, 30, .55); opacity: 0; transition: opacity .3s; }
.mobile-nav.is-open .mobile-nav__backdrop { opacity: 1; }
.mobile-nav__panel { position: absolute; top: 0; bottom: 0; left: 0; width: min(340px, 88vw); overflow-y: auto; padding: 0 18px 28px; background: #fff; color: var(--c-text); box-shadow: 12px 0 40px rgba(15, 25, 30, .25); transform: translateX(-102%); transition: transform .32s cubic-bezier(.2, .7, .2, 1); }
.mobile-nav.is-open .mobile-nav__panel { transform: none; }
.mobile-nav__top { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: 16px 0 12px; margin-bottom: 4px; background: #fff; border-bottom: 1px solid var(--c-border); }
.mobile-nav__title { font-family: var(--font-heading); font-size: 1.125rem; font-weight: 600; }
.mobile-nav__close { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--c-bg-soft); color: var(--c-text); display: grid; place-items: center; cursor: pointer; transition: background .2s, transform .2s; }
.mobile-nav__close:hover { background: var(--c-border); transform: rotate(90deg); }
.mobile-nav__label { margin: 18px 0 8px; font-size: .6875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--c-text-muted); }
.mobile-nav__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.mobile-nav__list a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; font-size: .9375rem; font-weight: 500; transition: background .2s, color .2s, transform .2s; }
.mobile-nav__list a:hover, .mobile-nav__list a.is-active { background: var(--tone-bg, var(--c-bg-soft)); color: var(--tone-ink, var(--c-primary)); transform: translateX(3px); }
.mobile-nav__ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--tone-bg, var(--c-bg-soft)); color: var(--tone-ink, var(--c-primary)); }
.mobile-nav__ico svg { width: 17px; height: 17px; }
.mobile-nav__name { flex: 1; }
.mobile-nav__count { min-width: 24px; padding: 1px 8px; border-radius: 99px; background: var(--c-bg-soft); font-size: .75rem; font-weight: 600; text-align: center; color: var(--c-text-muted); }
.mobile-nav__list--plain a { padding-block: 9px; font-weight: 500; color: var(--c-text-muted); }
.mobile-nav__account { display: grid; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--c-border); }
.mobile-nav__account .btn { width: 100%; height: 44px; }
.mobile-nav__ghost { background: transparent !important; color: var(--c-primary) !important; border: 1.5px solid var(--c-primary); }
.mobile-nav__ghost:hover { background: var(--c-bg-soft) !important; }
.mobile-nav__out { text-align: center; padding: 8px; font-weight: 600; color: #b3261e; }
body.nav-open { overflow: hidden; }

.search-form {
	justify-self: center; width: 100%; display: flex; align-items: center; gap: 8px;
	padding: 3px 3px 3px 14px; border: 1px solid var(--c-border); border-radius: 99px; background: var(--c-bg-soft);
	transition: border-color .2s, box-shadow .2s, background .2s;
}
.search-form:focus-within { background: #fff; border-color: var(--c-primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-primary) 12%, transparent); }
.search-form > svg { width: 17px; height: 17px; color: var(--c-text-muted); flex: none; }
.search-form input[type="search"] { flex: 1; width: auto; min-width: 0; height: 36px; padding: 0; border: 0; background: transparent; box-shadow: none; font-size: .875rem; }
.search-form input[type="search"]:focus { outline: 0; }
.search-form .btn { height: 34px; border-radius: 99px; padding: 0 16px; }
/* On phones the word "Search" is hidden, so the button shows a magnifier icon instead of an empty circle. */
.search-form .btn svg { display: none; }
@media (max-width: 599px) {
	.search-form { padding-left: 16px; }
	.search-form > svg { display: none; } /* only the green button keeps its icon on phones */
	.search-form .btn { width: 36px; height: 36px; padding: 0; flex: none; }
	.search-form .btn svg { display: block; width: 17px; height: 17px; }
}

.header-link { font-size: .875rem; font-weight: 600; padding: 8px 6px; color: inherit; }
.header-link:hover { color: var(--c-primary); }
.header-write { gap: 8px; white-space: nowrap; flex: none; }
.header-write svg { width: 16px; height: 16px; }

/* Account dropdown (avatar + first name + menu) */
.account-menu { position: relative; }
.account-menu__btn { display: inline-flex; align-items: center; gap: 8px; padding: 3px 8px 3px 3px; border: 0; border-radius: 99px; background: transparent; font: inherit; font-size: .875rem; font-weight: 700; color: inherit; cursor: pointer; transition: background .2s; }
.account-menu__btn:hover, .account-menu__btn[aria-expanded="true"] { background: var(--c-bg-soft); }
.account-menu__avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; display: block; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--c-primary); transition: box-shadow .2s; }
.account-menu__btn:hover .account-menu__avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--c-accent); }
.account-menu__btn svg { width: 16px; height: 16px; color: var(--c-text-muted); transition: transform .25s; }
.account-menu__btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.account-menu__name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu__pop { position: absolute; right: 0; top: calc(100% + 12px); width: 280px; z-index: 80; background: #fff; border: 1px solid var(--c-border); border-radius: 16px; box-shadow: 0 20px 50px rgba(31, 42, 48, .18); overflow: hidden; transform-origin: top right; animation: mmeb-pop .18s ease both; }
.account-menu__pop[hidden] { display: none; }
@keyframes mmeb-pop { from { opacity: 0; transform: translateY(-6px) scale(.97); } }
.account-menu__head { display: flex; gap: 12px; align-items: center; padding: 16px; background: linear-gradient(135deg, var(--c-bg-soft), #fff); border-bottom: 1px solid var(--c-border); }
.account-menu__head .account-menu__avatar { width: 48px; height: 48px; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--c-primary); }
.account-menu__head strong { display: block; font-family: var(--font-heading); font-weight: 600; line-height: 1.2; }
.account-menu__head span { display: block; font-size: .75rem; color: var(--c-text-muted); overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.account-menu__links { display: grid; padding: 8px; }
.account-menu__links a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; font-size: .9rem; font-weight: 600; transition: background .15s, color .15s, transform .15s; }
.account-menu__links a svg { width: 18px; height: 18px; color: var(--c-text-muted); flex: none; }
.account-menu__links a:hover { background: var(--c-bg-soft); color: var(--c-primary); transform: translateX(2px); }
.account-menu__links a:hover svg { color: var(--c-primary); }
.account-menu__links a.is-out { margin-top: 6px; border-top: 1px solid var(--c-border); border-radius: 0 0 10px 10px; padding-top: 14px; color: #b3261e; }
.account-menu__links a.is-out svg { color: #b3261e; }
.account-menu__links a.is-out:hover { background: #fdecea; color: #b3261e; }
.btn { transition: background .2s, transform .15s, box-shadow .2s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(31, 42, 48, .15); }

/* Tablet + mobile: hamburger menu instead of the category bar */
@media (max-width: 1023px) {
	.nav-toggle { display: inline-flex; }
	.js .cat-nav { display: none; }
	.site-header__bar { grid-template-columns: 1fr auto; grid-template-areas: "brand actions" "search search"; padding-block: 10px; row-gap: 10px; }
	.site-header__brand { grid-area: brand; }
	.site-header__bar .search-form { grid-area: search; }
	.header-actions { grid-area: actions; grid-column: auto; }
}
@media (max-width: 899px) {
	.account-menu__name, .account-menu__btn > svg { display: none; }
	.account-menu__btn { padding: 3px; }
	.header-write span { display: none; }
	.header-write { width: 40px; padding: 0; border-radius: 50%; }
	.header-signup { height: 36px; padding: 0 14px; }
	.account-menu__pop { right: -4px; width: min(280px, calc(100vw - 24px)); }
}

/* ---------- Animations ---------- */
@keyframes mmeb-rise { from { opacity: 0; transform: translateY(22px); } }
@keyframes mmeb-fade { from { opacity: 0; } }
main { animation: mmeb-fade .45s ease both; }
.js .reveal { opacity: 0; }
.js .reveal.is-in { opacity: 1; animation: mmeb-rise .65s cubic-bezier(.2, .7, .2, 1) var(--d, 0ms) backwards; }

.card { transition: transform .3s ease; }
.card:hover { transform: translateY(-5px); }
.thumb img { transition: transform .6s ease; }
.card:hover .thumb img, .featured:hover .thumb img, .popular__item:hover .thumb img { transform: scale(1.06); }
.thumb { box-shadow: 0 1px 2px rgba(31, 42, 48, .05); transition: box-shadow .3s; }
.card:hover .thumb { box-shadow: 0 14px 30px rgba(31, 42, 48, .14); }
.thumb__badge { transition: transform .3s; }
.card:hover .thumb__badge { transform: translateY(-3px); }
.card__title a, .popular__title a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size .35s ease, color .2s; }
.card:hover .card__title a, .popular__item:hover .popular__title a { background-size: 100% 2px; color: var(--c-primary); }
/* Big featured title: no underline, only a soft colour change. */
.featured__title a { text-decoration: none; transition: color .2s; }
.featured:hover .featured__title a { color: var(--c-primary); }
.about-box, .newsletter { transition: transform .3s, box-shadow .3s; }
.about-box:hover, .newsletter:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(31, 42, 48, .1); }

.to-top {
	position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 46px; height: 46px; border: 0; border-radius: 50%;
	background: var(--c-primary); color: #fff; display: grid; place-items: center; cursor: pointer;
	box-shadow: 0 8px 22px color-mix(in srgb, var(--c-primary) 40%, transparent); opacity: 0; transform: translateY(14px); pointer-events: none; transition: opacity .3s, transform .3s, background .2s;
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--c-primary-dark); }

/* ---------- Reading progress (single post) ---------- */
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 70; background: transparent; pointer-events: none; }
.read-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--c-primary), var(--c-accent)); transform: scaleX(0); transform-origin: left; will-change: transform; }
.read-progress--header { position: absolute; top: auto; bottom: -1px; height: 3px; z-index: 2; background: color-mix(in srgb, var(--c-primary) 10%, transparent); }
.read-progress--header span { box-shadow: 0 0 12px color-mix(in srgb, var(--c-primary) 50%, transparent); transition: transform .12s linear; }
.read-progress--header.is-done span { background: var(--c-primary); }
@media (prefers-reduced-motion: reduce) { .read-progress--header span { transition: none; } }

/* ---------- Single post ---------- */
.breadcrumb { font-size: .8125rem; color: var(--c-text-muted); padding-block: 16px 0; }
.breadcrumb a:hover { color: var(--c-primary); }
.breadcrumb span[aria-hidden] { margin-inline: 8px; }

.single-layout { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); padding-block: 14px 64px; }
.single-article { min-width: 0; order: 1; }
.single-side { order: 2; display: grid; gap: 16px; align-content: start; }
@media (min-width: 1000px) {
	.single-layout { grid-template-columns: 300px minmax(0, 1fr); gap: 44px; }
	.single-side { order: 1; position: sticky; top: calc(var(--header-h) + 60px); max-height: calc(100vh - var(--header-h) - 80px); overflow-y: auto; scrollbar-width: none; -ms-overflow-style: none; }
	.single-side::-webkit-scrollbar { display: none; }
	.single-article { order: 2; }
}

.side-card { background: #fff; border: 1px solid var(--c-border); border-radius: 14px; padding: 18px; }
.side-title { display: flex; align-items: center; gap: 8px; font-size: .9375rem; margin-bottom: 12px; }
.side-title svg { width: 17px; height: 17px; color: var(--c-primary); }
.side-label { display: block; font-size: .6875rem; text-transform: uppercase; letter-spacing: .08em; color: var(--c-text-muted); font-weight: 600; }
.author-card { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center; }
.author-card img { border-radius: 50%; }
.author-card strong { font-family: var(--font-heading); font-weight: 600; font-size: 1.0625rem; display: block; line-height: 1.2; }
.author-card__count { font-size: .75rem; color: var(--c-text-muted); }
.author-card p { grid-column: 1 / -1; font-size: .8125rem; color: var(--c-text-muted); line-height: 1.55; padding-top: 6px; }

.toc[hidden] { display: none; }
/* Contents toggle: only interactive on small screens, where the box sits under the featured image. */
.toc__toggle { all: unset; display: flex; align-items: center; gap: 8px; width: 100%; cursor: default; }
.toc__chev { display: none; margin-left: auto; transition: transform .25s; }
.toc.is-inline { margin: 22px 0 6px; }
.toc.is-inline .toc__toggle { cursor: pointer; }
.toc.is-inline .toc__toggle:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 4px; border-radius: 6px; }
.toc.is-inline .toc__chev { display: block; }
.toc.is-inline .side-title { margin-bottom: 0; }
.toc.is-inline.is-open .side-title { margin-bottom: 12px; }
.toc.is-inline.is-open .toc__chev { transform: rotate(180deg); }
.toc.is-inline:not(.is-open) .toc__list { display: none; }
.toc__list { list-style: none; counter-reset: toc; display: grid; gap: 2px; margin: 0; padding: 0; }
.toc__list li { counter-increment: toc; }
.toc__list a { display: block; padding: 6px 10px; border-left: 3px solid var(--c-border); font-size: .8125rem; line-height: 1.35; color: var(--c-text-muted); transition: all .2s; }
.toc__list li.is-sub a { padding-left: 22px; font-size: .78rem; }
.toc__list a:hover { color: var(--c-primary); border-left-color: var(--c-primary); background: var(--c-bg-soft); }
.toc__list a.is-active { color: var(--c-primary-dark); font-weight: 700; border-left-color: var(--c-primary); background: var(--c-bg-soft); }

/* Share icons (under the article title) */
.entry__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; }
.share-icons { display: flex; align-items: center; gap: 8px; }
.share__btn {
	--brand: var(--c-primary);
	display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid var(--c-border); border-radius: 50%;
	background: #fff; color: var(--c-text-muted); cursor: pointer; transition: transform .2s, background .2s, color .2s, border-color .2s, box-shadow .2s;
}
.share__btn svg { width: 17px; height: 17px; }
.share__btn:hover { transform: translateY(-3px); background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 8px 16px rgba(31, 42, 48, .18); }
.share__btn--wa { --brand: #25d366; } .share__btn--fb { --brand: #1877f2; } .share__btn--x { --brand: #111; } .share__btn--in { --brand: #0a66c2; }
.share__btn--copy.is-done { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }

/* Recent posts (sidebar) */
.recent-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.recent-list a { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; align-items: center; }
.recent-list__img { position: relative; display: block; width: 84px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--tone-bg, var(--c-bg-soft)); }
.recent-list__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.recent-list a:hover .recent-list__img img { transform: scale(1.08); }
.recent-list__txt strong { display: block; font-size: .8125rem; font-weight: 600; line-height: 1.35; transition: color .2s; }
.recent-list a:hover strong { color: var(--c-primary); }
.recent-list__txt small { display: block; margin-top: 3px; font-size: .6875rem; color: var(--c-text-muted); }
.info-grid--single { grid-template-columns: 1fr !important; }

.mini-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.mini-list a { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; font-size: .8125rem; font-weight: 600; line-height: 1.35; }
.mini-list img, .mini-list__ph { width: 56px; height: 56px; border-radius: 9px; object-fit: cover; background: var(--tone-bg, var(--c-bg-soft)); }
.mini-list a:hover span { color: var(--c-primary); }
.cat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.cat-list li { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-radius: 8px; font-size: .875rem; font-weight: 600; transition: background .2s; }
.cat-list li:hover { background: var(--tone-bg); }
.cat-list li a { flex: 1; }
.cat-list li span { font-size: .75rem; padding: 1px 9px; border-radius: 99px; background: var(--tone-bg); color: var(--tone-ink); }

.entry__header { margin-bottom: 22px; }
.entry__title { font-size: clamp(1.9rem, 4.5vw, 2.9rem); font-weight: 600; line-height: 1.1; margin: 10px 0 14px; }
.entry__lead { font-size: var(--fs-p); line-height: 1.6; color: var(--c-text-muted); margin-bottom: 16px; max-width: 62ch; }
.entry__meta { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.entry__meta .meta img { border-radius: 50%; }
.entry__hero { margin: 0 0 32px; aspect-ratio: 16 / 8.4; border-radius: 16px; }
.entry__hero:not(:has(img)) { display: none; }
.entry__content { font-size: var(--fs-p); line-height: 1.8; max-width: 740px; }
.entry--page .entry__content, .page-wrap .entry__content { max-width: 100%; }
.entry__content > * + * { margin-top: 1.15em; }
.entry__content h2 { font-size: 1.7rem; margin-top: 1.9em; scroll-margin-top: 100px; }
.entry__content h3 { font-size: 1.3rem; margin-top: 1.6em; scroll-margin-top: 100px; }
.entry__content a { color: var(--c-primary); text-decoration: underline; text-underline-offset: 3px; }
.entry__content ul, .entry__content ol { padding-left: 1.4em; }
.entry__content ul { list-style: disc; }
.entry__content li + li { margin-top: .45em; }
.entry__content blockquote { margin-inline: 0; padding: 18px 24px; border-left: 4px solid var(--c-primary); background: var(--c-bg-soft); border-radius: 0 12px 12px 0; font-size: 1.15rem; font-style: italic; }
.entry__content img, .entry__content figure { border-radius: 12px; }
.entry__content figcaption { font-size: .8125rem; color: var(--c-text-muted); margin-top: 8px; text-align: center; }
.entry__content table { width: 100%; border-collapse: collapse; font-size: .9375rem; display: block; overflow-x: auto; }
.entry__content th, .entry__content td { border: 1px solid var(--c-border); padding: 9px 12px; text-align: left; }

.entry__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.tag-pill { padding: 6px 14px; border-radius: 99px; background: var(--c-bg-soft); font-size: .8125rem; color: var(--c-text-muted); font-weight: 600; transition: all .2s; }
.tag-pill:hover { background: var(--c-primary); color: #fff; transform: translateY(-1px); }

.post-nav { display: grid; gap: 14px; margin-top: 44px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .post-nav { grid-template-columns: 1fr 1fr; } .post-nav__item--next:only-child { grid-column: 2; } }
.post-nav__item { position: relative; display: flex; align-items: center; gap: 14px; min-height: 96px; padding: 14px 16px 14px 14px; background: #fff; border: 1px solid var(--c-border); border-radius: 16px; color: var(--c-text); transition: border-color .25s, box-shadow .25s, transform .25s; }
.post-nav__item--next { flex-direction: row-reverse; text-align: right; padding: 14px 14px 14px 16px; }
.post-nav__thumb { flex: none; width: 68px; height: 68px; border-radius: 12px; overflow: hidden; background: var(--tone-bg, var(--c-bg-soft)); }
.post-nav__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.post-nav__body { flex: 1; min-width: 0; display: grid; gap: 4px; }
.post-nav__label { color: var(--c-primary); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.post-nav__title { font-family: var(--font-heading); font-size: 1rem; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-nav__arrow { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--c-bg-soft); color: var(--c-primary); transition: background .25s, color .25s, transform .25s; }
.post-nav__item:hover { border-color: var(--c-primary); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(31, 42, 48, .08); }
.post-nav__item:hover .post-nav__arrow { background: var(--c-primary); color: #fff; }
.post-nav__item--prev:hover .post-nav__arrow { transform: translateX(-3px); }
.post-nav__item--next:hover .post-nav__arrow { transform: translateX(3px); }
.post-nav__item:hover .post-nav__thumb img { transform: scale(1.06); }
@media (max-width: 479px) { .post-nav__thumb { width: 56px; height: 56px; } .post-nav__arrow { display: none; } }
.related { background: var(--c-bg-soft); padding-block: 48px; }

/* ---------- Pages (imprint, about …) ---------- */
.page-wrap { padding-block: 40px 64px; }
.page-header { margin: 0 0 24px; }
.page-title { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 600; }

/* ---------- Search ---------- */
.search-hero { background: linear-gradient(180deg, var(--c-bg-soft), #fff); padding-block: 42px 18px; border-bottom: 1px solid var(--c-border); }
.search-hero__title { font-size: clamp(1.6rem, 3.6vw, 2.4rem); font-weight: 600; margin: 8px 0 20px; }
.search-hero__title strong { color: var(--c-primary); font-weight: 600; }
.search-hero__title em { font-style: normal; font-weight: 600; }
.search-big { display: flex; align-items: center; gap: 10px; max-width: 680px; padding: 6px 6px 6px 18px; border: 1.5px solid var(--c-border); border-radius: 99px; background: #fff; box-shadow: 0 8px 28px rgba(31, 42, 48, .07); transition: border-color .2s, box-shadow .2s; }
.search-big:focus-within { border-color: var(--c-primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-primary) 12%, transparent), 0 8px 28px rgba(31, 42, 48, .07); }
.search-big svg { width: 20px; height: 20px; color: var(--c-text-muted); flex: none; }
.search-big input[type="search"] { flex: 1; min-width: 0; height: 44px; border: 0; background: transparent; font-size: 1rem; color: inherit; }
.search-big input[type="search"]:focus { outline: 0; }
.search-big .btn { height: 44px; border-radius: 99px; padding: 0 24px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chips--center { justify-content: center; }
.chip { padding: 7px 16px; border-radius: 99px; background: var(--tone-bg, #fff); color: var(--tone-ink, var(--c-text)); border: 1px solid transparent; font-size: .8125rem; font-weight: 700; transition: all .2s; }
.chips > .chip:first-child:not([class*="tone-"]):not(.is-active) { background: #fff; border-color: var(--c-border); }
.chip:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(31, 42, 48, .1); }
.chip.is-active { background: var(--c-primary); color: #fff; }
.nothing { text-align: center; padding: 20px 0 48px; }
.nothing__art { width: 220px; margin: 0 auto 8px; }
.nothing h2 { font-size: 1.6rem; margin-bottom: 8px; }
.nothing p { color: var(--c-text-muted); max-width: 46ch; margin: 0 auto 18px; }
.nothing__head { margin-top: 24px; }

/* ---------- Archive ---------- */
.archive-hero { background: var(--tone-bg, var(--c-bg-soft)); padding-block: 46px 40px; position: relative; overflow: hidden; }
.archive-hero::after { content: ""; position: absolute; width: 340px; height: 340px; border-radius: 50%; background: rgba(255, 255, 255, .5); right: -80px; top: -130px; }
.archive-hero .container { position: relative; z-index: 1; }
.archive-hero__title { font-size: clamp(1.9rem, 4.5vw, 3rem); font-weight: 600; margin: 6px 0 8px; }
.archive-desc { color: var(--c-text-muted); max-width: 60ch; margin-bottom: 10px; }
.archive-hero__count { display: inline-block; padding: 4px 14px; border-radius: 99px; background: rgba(255, 255, 255, .7); font-size: .8125rem; font-weight: 700; color: var(--tone-ink); }

/* ---------- Pagination ---------- */
.navigation.pagination { margin-top: 40px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.page-numbers { min-width: 42px; height: 42px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--c-border); border-radius: 10px; background: #fff; font-size: .875rem; font-weight: 700; transition: all .2s; }
a.page-numbers:hover { border-color: var(--c-primary); color: var(--c-primary); transform: translateY(-2px); }
.page-numbers.current { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding-block: 64px 90px; }
.notfound h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); }
.notfound p { color: var(--c-text-muted); margin: 10px auto 22px; max-width: 48ch; }
.notfound .search-big { margin: 0 auto 22px; }

/* ---------- Comments ---------- */
.comments { max-width: 740px; margin: 56px 0 0; }
.comments__title { font-size: 1.4rem; margin-bottom: 18px; }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 24px; }
.comment-body { padding: 16px 0; border-bottom: 1px solid var(--c-border); font-size: .9375rem; }
.comment-author { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.comment-author img { border-radius: 50%; }
.comment-metadata { font-size: .75rem; color: var(--c-text-muted); margin: 2px 0 8px; }
.comment-respond { margin-top: 28px; }
.comment-form label { display: block; font-size: .8125rem; font-weight: 700; margin-bottom: 5px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { width: 100%; padding: 11px 13px; border: 1.5px solid var(--c-border); border-radius: 9px; background: #fff; font: inherit; }
.comment-form input:focus, .comment-form textarea:focus { outline: 0; border-color: var(--c-primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-primary) 12%, transparent); }
.comment-form p { margin-bottom: 14px; }
.comment-form .submit { height: 46px; padding: 0 24px; border: 0; border-radius: var(--radius-sm); background: var(--c-primary); color: #fff; font-weight: 700; cursor: pointer; }
.comment-form .submit:hover { background: var(--c-primary-dark); }

@media (prefers-reduced-motion: reduce) {
	main, .js .reveal.is-in { animation: none !important; }
	.js .reveal { opacity: 1; }
	.card, .thumb img, .btn { transition: none !important; }
	.card:hover { transform: none; }
}

/* ---------- Phones: compact header (search behind an icon) ---------- */
.search-toggle { display: none; width: 40px; height: 40px; flex: none; padding: 0; border: 1px solid var(--c-border); border-radius: 50%; background: transparent; color: inherit; cursor: pointer; place-items: center; transition: background .2s, border-color .2s; }
.search-toggle:hover, .search-toggle[aria-expanded="true"] { background: var(--c-bg-soft); border-color: var(--c-primary); color: var(--c-primary); }
.site-logo { white-space: nowrap; }
@media (max-width: 767px) {
	.js .search-toggle { display: inline-grid; }
	.js .site-header__bar { row-gap: 0; }
	.js .site-header__bar .search-form { display: none; margin-top: 10px; }
	.js .site-header.is-search-open .site-header__bar .search-form { display: flex; animation: mmeb-fade .2s ease; }
	.header-actions { gap: 8px; }
}
@media (max-width: 479px) {
	.header-signup { display: none; } /* "Register" stays in the menu */
	.site-logo { font-size: 1.3rem; }
}

/* ---------- Phones: article first view – category, title, one meta line, then the image ---------- */
.entry__cat { display: inline-block; margin-top: 6px; }
@media (max-width: 767px) {
	.single .breadcrumb { display: none; }
	.single-layout { padding-top: 4px; }
	.single-article { display: flex; flex-direction: column; }
	.single-article > * { order: 20; }
	.single-article > .entry__header, .single-article .entry__bar { display: contents; }
	.entry__cat { order: 1; align-self: flex-start; margin-top: 12px; }
	.entry__title { order: 2; margin: 8px 0 10px; font-size: clamp(1.6rem, 7vw, 1.95rem); line-height: 1.15; }
	.entry__meta { order: 3; flex-wrap: nowrap; gap: 14px; margin-bottom: 16px; overflow: hidden; white-space: nowrap; font-size: .8125rem; }
	.entry__meta .meta--views { display: none; }
	.single-article > .entry__hero { order: 4; margin: 0 0 18px; }
	.entry__lead { order: 5; margin: 0 0 18px; padding-left: 14px; border-left: 3px solid var(--c-primary); font-size: 1rem; line-height: 1.6; color: var(--c-text); font-weight: 500; }
	.single-article > .toc.is-inline { order: 6; }
	.single-article > .entry__content { order: 10; }
	.share-icons { order: 11; flex-wrap: wrap; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--c-border); }
	.share-icons::before { content: attr(aria-label); width: 100%; margin-bottom: 4px; color: var(--c-text-muted); font-size: .6875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
}
