/*
Theme Name: Folio Mag
Theme URI: https://devgraze.com
Author: Devgraze
Author URI: https://devgraze.com
Description: A monochrome editorial magazine theme — black & white, serif headlines, spotlight hero, latest list, category blocks and trending tags. Built for fashion, lifestyle and news blogs.
Version: 1.0.0
Requires at least: 6.0
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: folio-mag
Tags: blog, news, magazine, black, white, two-columns, custom-menu, custom-logo, featured-images, threaded-comments
*/

/* ---------- Tokens ---------- */
:root {
	--ink: #0a0a0a;
	--paper: #ffffff;
	--muted: #6b6b6b;
	--line: #e5e5e5;
	--soft: #f5f5f4;
	--serif: "Playfair Display", Georgia, "Times New Roman", serif;
	--sans: "Mona Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	--wrap: 1240px;
	--gutter: 24px;
	--radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 999; background: var(--ink); color: var(--paper); padding: 8px 14px; clip: auto; width: auto; height: auto; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Small type helpers ---------- */
.kicker {
	display: inline-block;
	font-family: var(--sans);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--ink);
}
.kicker a { color: inherit; }
.byline { font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.byline strong { color: var(--ink); font-weight: 600; }

/* ---------- Top bar ---------- */
.topbar { border-bottom: 1px solid var(--line); font-size: 12px; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; height: 40px; gap: 16px; }
.topbar-date { color: var(--muted); letter-spacing: .04em; text-transform: uppercase; font-weight: 500; }
.socials { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; }
.socials a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }
.socials svg { width: 14px; height: 14px; fill: currentColor; }

/* ---------- Masthead ---------- */
.masthead { text-align: center; padding: 34px 0 26px; border-bottom: 1px solid var(--ink); }
.site-title { font-family: var(--serif); font-size: clamp(40px, 7vw, var(--title-size, 84px)); font-weight: 800; letter-spacing: -0.03em; line-height: 1; margin: 0; }
.site-title a:hover { text-decoration: none; }
.site-tagline { margin: 10px 0 0; font-size: 12px; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); }
.custom-logo-link { display: inline-block; }
.custom-logo { margin: 0 auto; width: var(--logo-w, 280px); max-width: 100%; height: auto; }

/* ---------- Nav ---------- */
.site-nav { border-bottom: 3px double var(--ink); position: sticky; top: 0; background: var(--paper); z-index: 50; }
.admin-bar .site-nav { top: 32px; }
.site-nav .wrap { display: flex; align-items: center; justify-content: center; position: relative; min-height: 52px; }
.menu, .menu ul { list-style: none; margin: 0; padding: 0; }
.primary-menu { display: flex; flex-wrap: wrap; justify-content: center; }
.primary-menu > li { position: relative; }
.primary-menu > li > a {
	display: block; padding: 16px 18px;
	font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}
.primary-menu > li > a:hover { text-decoration: none; background: var(--ink); color: var(--paper); }
.primary-menu .sub-menu {
	position: absolute; top: 100%; left: 0; min-width: 220px;
	background: var(--paper); border: 1px solid var(--ink); padding: 8px 0;
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s ease; z-index: 60;
}
.primary-menu .sub-menu .sub-menu { top: -9px; left: 100%; }
.primary-menu li:hover > .sub-menu, .primary-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.primary-menu .sub-menu li { position: relative; }
.primary-menu .sub-menu a { display: block; padding: 8px 18px; font-size: 13px; font-weight: 500; }
.primary-menu .sub-menu a:hover { background: var(--soft); text-decoration: none; }
.menu-item-has-children > a::after { content: "+"; margin-left: 6px; font-weight: 400; }

.nav-actions { position: absolute; right: var(--gutter); display: flex; gap: 6px; }
.icon-btn { background: none; border: 0; padding: 8px; cursor: pointer; color: var(--ink); display: inline-flex; border-radius: var(--radius); }
.icon-btn:hover { background: var(--soft); }
.icon-btn svg { width: 20px; height: 20px; }
.menu-toggle { display: none; position: absolute; left: var(--gutter); }

.search-panel { display: none; border-top: 1px solid var(--line); padding: 18px 0; }
.search-panel.is-open { display: block; }
.search-form { display: flex; max-width: 640px; margin: 0 auto; border: 1px solid var(--ink); border-radius: var(--radius); overflow: hidden; }
.search-form input[type=search] { flex: 1; border: 0; padding: 12px 16px; font: inherit; outline: none; background: transparent; color: var(--ink); }
.search-form button { border: 0; background: var(--ink); color: var(--paper); padding: 0 22px; font: 700 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; cursor: pointer; }

/* ---------- Section heads ---------- */
.section { padding: 48px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-top: 3px solid var(--ink); padding-top: 12px; margin-bottom: 28px; }
.section-title { font-family: var(--serif); font-size: 30px; font-weight: 800; text-transform: uppercase; letter-spacing: .01em; }
.section-title a::after { content: " →"; font-family: var(--sans); font-weight: 400; }
.see-all { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; border-bottom: 1px solid var(--ink); padding-bottom: 2px; white-space: nowrap; }
.see-all:hover { text-decoration: none; opacity: .6; }
.more-row { text-align: center; margin-top: 36px; }
.btn-outline {
	display: inline-block; border: 1px solid var(--ink); border-radius: var(--radius); padding: 13px 28px;
	font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; transition: .15s;
}
.btn-outline:hover { background: var(--ink); color: var(--paper); text-decoration: none; }

/* ---------- Thumbs ---------- */
.thumb { display: block; overflow: hidden; background: var(--soft); border-radius: var(--radius); position: relative; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.thumb:hover img, .card:hover .thumb img { transform: scale(1.03); }
.thumb.r-16x10 { aspect-ratio: 16/10; }
.thumb.r-3x2 { aspect-ratio: 3/2; }
.thumb.r-4x5 { aspect-ratio: 4/5; }
.thumb.r-1 { aspect-ratio: 1/1; }
.thumb-empty { width: 100%; height: 100%; display: grid; place-items: center; font-family: var(--serif); font-size: 42px; font-weight: 800; color: #c9c9c9; }

/* ---------- Spotlight (hero) ---------- */
.spotlight { display: grid; grid-template-columns: 1.7fr 1fr; gap: 40px; }
.spotlight-main .thumb { aspect-ratio: 16/11; }
.spotlight-main .kicker { margin-top: 20px; }
.spotlight-main h2 { font-size: clamp(30px, 3.6vw, 48px); margin: 10px 0 12px; }
.spotlight-main .excerpt { font-family: var(--serif); font-size: 18px; color: #333; font-style: italic; max-width: 60ch; }
.spotlight-side { border-left: 1px solid var(--line); padding-left: 32px; }
.side-label { font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; padding-bottom: 12px; border-bottom: 1px solid var(--ink); margin-bottom: 4px; }
.mini { display: grid; grid-template-columns: 1fr 96px; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: start; }
.mini:last-child { border-bottom: 0; }
.mini h3 { font-size: 18px; margin: 6px 0 8px; }
.mini .thumb { aspect-ratio: 1/1; }
.mini .num { font-family: var(--serif); font-size: 13px; color: var(--muted); }

/* ---------- Latest (numbered grid) ---------- */
.latest-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); }
.latest-item { padding: 22px 22px 22px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr 72px; gap: 14px; }
.latest-item + .latest-item { padding-left: 22px; border-left: 1px solid var(--line); }
.latest-item:nth-child(4n+1) { padding-left: 0; border-left: 0; }
.latest-item h3 { font-size: 16px; margin: 6px 0 8px; }
.latest-item .thumb { aspect-ratio: 1/1; }

/* ---------- Cards ---------- */
.card h3 { font-size: 21px; margin: 8px 0 10px; }
.card .kicker { margin-top: 16px; }
.card .excerpt { color: #444; font-size: 15px; }

/* Category block: one tall + two stacked */
.cat-block { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 32px; }
.cat-block .card:first-child h3 { font-size: 28px; }
.cat-block.layout-4 { grid-template-columns: repeat(4, 1fr); }
.cat-block.layout-4 .card:first-child h3 { font-size: 21px; }
/* Fewer posts than the layout needs: equal, balanced cards */
.cat-block.cat-few { grid-template-columns: repeat(2, 1fr); }
.cat-block.cat-few.count-3 { grid-template-columns: repeat(3, 1fr); }
.cat-block.cat-few .card h3, .cat-block.cat-few .card:first-child h3 { font-size: 26px; }
.cat-block.cat-few.count-3 .card h3 { font-size: 22px; }
.cat-block.cat-few.count-1 { grid-template-columns: 1fr; }
.cat-block.cat-few.count-1 .card { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; }
.cat-block.cat-few.count-1 .card > .thumb { grid-row: 1 / span 5; }
.cat-block.cat-few.count-1 .card h3 { font-size: 34px; }

/* More stories grid + archive grid (no sidebar) */
.more-grid, .archive-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 32px; }
.archive-grid .row-feature { grid-column: 1 / -1; }
.row-card.row-feature { grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; padding: 0 0 40px; }
.row-card.row-feature h3 { font-size: clamp(28px, 3vw, 40px); }

/* Most Read ranked strip */
.rank-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); counter-reset: none; }
.rank-item { padding: 0 24px; border-left: 1px solid var(--line); }
.rank-item:first-child { padding-left: 0; border-left: 0; }
.rank-num { display: block; font-family: var(--serif); font-size: 64px; font-weight: 800; line-height: 1; margin-bottom: 14px; color: var(--ink); -webkit-text-stroke: 0; }
.rank-item h3 { font-size: 18px; margin: 8px 0 10px; }

/* ---------- Dark band (trending tags) ---------- */
.band { background: var(--ink); color: var(--paper); padding: 56px 0; }
.band .section-head { border-color: var(--paper); }
.band .see-all { border-color: var(--paper); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; margin: 0; padding: 0; }
.tag-cloud a {
	display: inline-block; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: 10px 20px;
	font-family: var(--serif); font-size: 18px; font-style: italic; transition: .15s;
}
.tag-cloud a:hover { background: var(--paper); color: var(--ink); text-decoration: none; }
.tag-cloud small { font-family: var(--sans); font-style: normal; font-size: 11px; opacity: .55; margin-left: 6px; }

/* ---------- Quote / editorial strip ---------- */
.editors-note { text-align: center; padding: 64px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.editors-note blockquote { margin: 0 auto; max-width: 820px; font-family: var(--serif); font-size: clamp(24px, 3vw, 36px); font-style: italic; line-height: 1.3; }
.editors-note cite { display: block; margin-top: 18px; font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }

/* ---------- Long list (more latest / archive) ---------- */
.row-card { display: grid; grid-template-columns: 300px 1fr; gap: 28px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.row-card:first-child { padding-top: 0; }
.row-card h3 { font-size: 26px; margin: 8px 0 12px; }
.row-card .excerpt { color: #444; }

/* ---------- Widgets (footer) ---------- */
.widget-title { font-size: 11px !important; font-family: var(--sans) !important; font-weight: 700 !important; letter-spacing: .2em; text-transform: uppercase; border-top: 3px solid var(--ink); padding-top: 10px; margin-bottom: 16px !important; }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }

/* ---------- Archive head ---------- */
.archive-head { text-align: center; padding: 56px 0 40px; border-bottom: 1px solid var(--ink); margin-bottom: 40px; }
.archive-head h1 { font-size: clamp(40px, 6vw, 72px); font-weight: 800; }
.archive-head .archive-desc { max-width: 640px; margin: 14px auto 0; color: var(--muted); }

/* ---------- Single ---------- */
.post-hero { text-align: center; padding: 56px 0 32px; }
.post-hero h1 { font-size: clamp(34px, 5vw, 60px); max-width: 960px; margin: 14px auto 18px; }
.post-hero .dek { font-family: var(--serif); font-style: italic; font-size: 20px; color: #444; max-width: 720px; margin: 0 auto 20px; }
.post-meta { display: flex; justify-content: center; gap: 14px; font-size: 12px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.post-meta strong { color: var(--ink); }
.post-cover { margin: 0 auto 48px; max-width: 1100px; }
.post-cover .cover-frame { aspect-ratio: var(--cover-ratio, 16/9); overflow: hidden; border-radius: var(--radius); background: var(--soft); }
.post-cover .cover-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.post-cover figcaption { font-size: 12px; color: var(--muted); margin-top: 8px; }
.entry-content { max-width: 720px; margin: 0 auto; font-size: 18px; line-height: 1.75; }
.entry-content h2 { font-size: 32px; margin: 1.6em 0 .6em; }
.entry-content h3 { font-size: 24px; margin: 1.4em 0 .5em; }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; }
.entry-content blockquote { margin: 2em 0; padding: 0 0 0 24px; border-left: 3px solid var(--ink); font-family: var(--serif); font-size: 24px; font-style: italic; line-height: 1.4; }
.entry-content img, .entry-content figure { margin: 2em 0; border-radius: var(--radius); }
.entry-content figcaption { font-size: 13px; color: var(--muted); text-align: center; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content pre { background: var(--soft); padding: 18px; overflow: auto; border-radius: var(--radius); font-size: 14px; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 15px; }
.entry-content th, .entry-content td { border-bottom: 1px solid var(--line); padding: 10px; text-align: left; }
.alignwide { max-width: 1000px; margin-left: auto; margin-right: auto; }
.alignfull { width: 100vw; margin-left: calc(50% - 50vw); }
.aligncenter { margin-left: auto; margin-right: auto; }

.post-footer { max-width: 720px; margin: 48px auto 0; padding-top: 24px; border-top: 1px solid var(--ink); }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.post-tags a { border: 1px solid var(--ink); border-radius: 999px; padding: 6px 14px; font-size: 12px; font-weight: 600; }
.post-tags a:hover { background: var(--ink); color: var(--paper); text-decoration: none; }
.share { display: flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.share a { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; }
.share a:hover { border-color: var(--ink); }
.share svg { width: 15px; height: 15px; fill: currentColor; }
.author-box { display: grid; grid-template-columns: 72px 1fr; gap: 18px; margin-top: 32px; padding: 24px; background: var(--soft); border-radius: var(--radius); }
.author-box img { border-radius: 50%; }
.author-box h4 { font-size: 20px; margin-bottom: 4px; }
.author-box p { font-size: 14px; color: #444; margin: 0; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 720px; margin: 40px auto 0; }
.post-nav a { display: block; padding: 18px 0; border-top: 1px solid var(--line); }
.post-nav span { display: block; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.post-nav strong { font-family: var(--serif); font-size: 18px; }
.post-nav .next { text-align: right; }

/* ---------- Comments ---------- */
.comments-area { max-width: 720px; margin: 56px auto 0; }
.comments-title { font-size: 26px; margin-bottom: 20px; }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 28px; }
.comment-body { padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.comment-author img { float: left; margin-right: 12px; border-radius: 50%; }
.comment-metadata { font-size: 12px; color: var(--muted); }
.comment-form input[type=text], .comment-form input[type=email], .comment-form input[type=url], .comment-form textarea {
	width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; background: var(--paper); color: var(--ink);
}
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--ink); }
.comment-form .submit, .btn {
	background: var(--ink); color: var(--paper); border: 0; border-radius: var(--radius); padding: 13px 28px; cursor: pointer;
	font: 700 11px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase;
}

/* ---------- Pagination ---------- */
.pagination { margin-top: 40px; }
.pagination .nav-links { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.pagination .page-numbers { min-width: 42px; height: 42px; display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; font-weight: 600; }
.pagination .page-numbers.current, .pagination .page-numbers:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); text-decoration: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #d4d4d4; margin-top: 72px; }
.site-footer a:hover { color: var(--paper); }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding: 64px 0 48px; }
.footer-brand .site-title { font-size: 40px; color: var(--paper); }
.footer-logo { display: inline-block; }
.footer-logo img { width: var(--flogo-w, 180px); max-width: 100%; height: auto; }
.footer-brand p { margin-top: 14px; font-size: 14px; max-width: 32ch; }
.footer-col h4 { font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--paper); margin-bottom: 16px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { padding: 5px 0; font-size: 14px; }
.footer-socials .socials { flex-wrap: wrap; }
.footer-socials .socials a { color: var(--paper); border: 1px solid #333; border-radius: 999px; padding: 8px 14px; }
.footer-bottom { border-top: 1px solid #262626; padding: 20px 0; font-size: 12px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: #8a8a8a; }
.site-footer .footer-col .widget-title { border-color: var(--paper); color: var(--paper); }

/* ---------- 404 / empty ---------- */
.empty-state { text-align: center; padding: 96px 0; }
.empty-state h1 { font-size: clamp(72px, 14vw, 180px); font-weight: 800; line-height: 1; }
.empty-state p { color: var(--muted); margin: 16px 0 28px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
	.latest-grid { grid-template-columns: repeat(2, 1fr); }
	.latest-item:nth-child(4n+1) { padding-left: 22px; border-left: 1px solid var(--line); }
	.latest-item:nth-child(2n+1) { padding-left: 0; border-left: 0; }
	.cat-block.layout-4 { grid-template-columns: repeat(2, 1fr); }
	.footer-top { grid-template-columns: 1fr 1fr; }
	.more-grid, .archive-grid { grid-template-columns: repeat(2, 1fr); }
	.rank-strip { grid-template-columns: repeat(3, 1fr); row-gap: 32px; }
	.rank-item:nth-child(3n+1) { padding-left: 0; border-left: 0; }
}
@media (max-width: 900px) {
	.spotlight { grid-template-columns: 1fr; }
	.spotlight-side { border-left: 0; padding-left: 0; }
		.cat-block { grid-template-columns: 1fr 1fr; }
	.cat-block .card:first-child { grid-column: 1 / -1; }
	.cat-block.cat-few .card:first-child { grid-column: auto; }
	.cat-block.cat-few.count-3 { grid-template-columns: 1fr 1fr; }
	.cat-block.cat-few.count-1 .card, .row-card.row-feature { grid-template-columns: 1fr; gap: 0; }
	.cat-block.cat-few.count-1 .card > .thumb { grid-row: auto; }
	.menu-toggle { display: inline-flex; }
	.site-nav .wrap { justify-content: space-between; }
	.primary-nav-wrap { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--ink); max-height: 75vh; overflow: auto; }
	.primary-nav-wrap.is-open { display: block; }
	.primary-menu { flex-direction: column; padding: 8px var(--gutter) 16px; }
	.primary-menu > li > a { padding: 12px 0; border-bottom: 1px solid var(--line); }
	.primary-menu > li > a:hover { background: none; color: inherit; }
	.primary-menu .sub-menu, .primary-menu .sub-menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; border: 0; padding: 0 0 0 14px; min-width: 0; }
	.menu-item-has-children > a::after { content: ""; }
	.admin-bar .site-nav { top: 0; }
}
@media (max-width: 640px) {
	:root { --gutter: 16px; }
	.topbar-date { display: none; }
	.topbar .wrap { justify-content: center; }
	.section { padding: 36px 0; }
	.section-title { font-size: 22px; }
	.latest-grid, .cat-block, .cat-block.layout-4, .cat-block.cat-few, .cat-block.cat-few.count-3, .more-grid, .archive-grid { grid-template-columns: 1fr; }
	.rank-strip { grid-template-columns: 1fr; row-gap: 0; }
	.rank-item, .rank-item:nth-child(3n+1) { padding: 18px 0; border-left: 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 56px 1fr; column-gap: 12px; }
	.rank-item > *:not(.rank-num) { grid-column: 2; }
	.rank-num { grid-row: 1 / span 3; font-size: 40px; margin: 0; }
	.cat-block.cat-few .card h3, .cat-block.cat-few.count-1 .card h3 { font-size: 22px; }
	.latest-item, .latest-item + .latest-item, .latest-item:nth-child(2n+1) { padding: 18px 0; border-left: 0; }
	.row-card { grid-template-columns: 1fr; gap: 16px; }
	.row-card h3 { font-size: 22px; }
	.footer-top { grid-template-columns: 1fr; }
	.post-nav { grid-template-columns: 1fr; }
	.entry-content { font-size: 17px; }
}
