/*
Theme Name: Quire
Theme URI: https://example.com/quire
Author: Quire
Author URI: https://example.com
Description: A fast, editorial WordPress blog theme. Typography-first reading experience, responsive post grids with pagination, a fully customizable header, footer and sidebar, and around 150 Customizer settings covering colours, fonts, spacing, layout, buttons and widgets. No jQuery, no page builder, no bloat. Built for Core Web Vitals.
Version: 1.1.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: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: quire
Tags: blog, news, one-column, two-columns, right-sidebar, left-sidebar, grid-layout, custom-colors, custom-logo, custom-menu, editor-style, featured-images, footer-widgets, sticky-post, threaded-comments, translation-ready, block-styles, wide-blocks
*/

/* ==========================================================================
   Quire
   A blog is read, not browsed. So the page is built like a printed journal:
   a fixed reading measure, hairline rules that group without boxing, and a
   small monospace register for everything that is data rather than prose.
   Every value below is a variable the Customizer writes to.
   ========================================================================== */

:root {
	/* colour */
	--paper: #fafafa;
	--surface: #ffffff;
	--ink: #17171a;
	--heading: #0e0e11;
	--muted: #6a6a72;
	--accent: #c2410c;
	--accent-ink: #ffffff;
	--line: color-mix(in srgb, var(--ink) 13%, transparent);
	--line-soft: color-mix(in srgb, var(--ink) 7%, transparent);

	/* type */
	--f-head: Georgia, "Times New Roman", serif;
	--f-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--f-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
	--fs: 17px;
	--lh: 1.65;
	--track: -.011em;
	--head-track: -.022em;
	--head-weight: 700;
	--head-lh: 1.14;

	--h1: clamp(2rem, 1.35rem + 2.6vw, 3.1rem);
	--h2: clamp(1.55rem, 1.25rem + 1.3vw, 2.1rem);
	--h3: clamp(1.28rem, 1.12rem + .7vw, 1.6rem);
	--h4: 1.12rem;
	--small: .875rem;
	--micro: .76rem;

	/* layout */
	--wrap: 1200px;
	--content: 720px;
	--sidebar: 320px;
	--gutter: 56px;
	--pad: 24px;
	--gap: 36px;
	--flow: 1.5em;
	--block: 56px;

	/* components */
	--radius: 6px;
	--card-radius: 8px;
	--btn-radius: 4px;
	--btn-py: .72rem;
	--btn-px: 1.35rem;
	--btn-fs: .92rem;
	--btn-weight: 600;
	--btn-tt: none;
	--btn-bg: var(--accent);
	--btn-fg: var(--accent-ink);
	--img-ratio: 3 / 2;
	--cols: 3;
	--header-h: 74px;
	--logo-h: 40px;

	--ease: cubic-bezier(.2, .7, .3, 1);
}

html[data-scheme="dark"] {
	--paper: #101013;
	--surface: #17171b;
	--ink: #e9e9ec;
	--heading: #f6f6f8;
	--muted: #9a9aa4;
	--accent: #ff7a4d;
	--line: color-mix(in srgb, var(--ink) 16%, transparent);
	--line-soft: color-mix(in srgb, var(--ink) 9%, transparent);
}

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

html { font-size: var(--fs); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--f-body);
	line-height: var(--lh);
	letter-spacing: var(--track);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

img, svg, video, iframe, canvas { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--f-head);
	font-weight: var(--head-weight);
	line-height: var(--head-lh);
	letter-spacing: var(--head-track);
	color: var(--heading);
	margin: 0 0 .45em;
	text-wrap: balance;
}
h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); }
h4 { font-size: var(--h4); }
p { margin: 0 0 var(--flow); text-wrap: pretty; }

/* --- utilities ---------------------------------------------------------- */

.container { width: min(100% - (var(--pad) * 2), var(--wrap)); margin-inline: auto; }
.measure { max-width: var(--content); }
.stack > * + * { margin-top: var(--gap); }

.screen-reader-text, .sr-only {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 999; background: var(--ink); color: var(--paper); padding: .7rem 1.1rem; }
.skip-link:focus { left: 8px; top: 8px; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
	border-radius: 2px;
}

/* The register: anything that is data rather than prose. */
.register {
	font-family: var(--f-mono);
	font-size: var(--micro);
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--muted);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem .85rem;
	margin: 0;
}
.register a { text-decoration: none; }
.register a:hover { color: var(--accent); }
.register__sep { opacity: .4; }
.register--accent > a:first-child { color: var(--accent); }

/* --- buttons ------------------------------------------------------------ */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	padding: var(--btn-py) var(--btn-px);
	font-family: var(--f-body);
	font-size: var(--btn-fs);
	font-weight: var(--btn-weight);
	text-transform: var(--btn-tt);
	letter-spacing: var(--track);
	text-decoration: none;
	border: 1.5px solid var(--btn-bg);
	border-radius: var(--btn-radius);
	background: var(--btn-bg);
	color: var(--btn-fg);
	cursor: pointer;
	transition: transform .16s var(--ease), background-color .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease);
}
.btn--outline { background: transparent; color: var(--btn-bg); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--text { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: default; }
.btn svg { width: 17px; height: 17px; }

.btnfx-lift .btn:hover { transform: translateY(-2px); }
.btnfx-grow .btn:hover { transform: scale(1.03); }
.btn:hover { background-color: color-mix(in srgb, #000 14%, var(--btn-bg)); border-color: color-mix(in srgb, #000 14%, var(--btn-bg)); }
.btn--outline:hover { background-color: var(--btn-bg); color: var(--btn-fg); }
.btn--ghost:hover { background-color: color-mix(in srgb, var(--ink) 7%, transparent); border-color: var(--line); color: var(--ink); }
.btn--text:hover { background: none; transform: none; color: var(--accent); }

/* --- header ------------------------------------------------------------- */

.topbar {
	background: var(--surface);
	border-bottom: 1px solid var(--line-soft);
	font-size: var(--micro);
	font-family: var(--f-mono);
	color: var(--muted);
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 38px; flex-wrap: wrap; }

.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.site-header--sticky { position: sticky; top: 0; z-index: 60; background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: saturate(1.5) blur(12px); -webkit-backdrop-filter: saturate(1.5) blur(12px); }
.site-header--bare { border-bottom: 0; }

.masthead {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	min-height: var(--header-h);
	padding-block: .5rem;
}
.masthead--center { flex-direction: column; gap: .75rem; text-align: center; padding-block: 1.4rem; }
.masthead--center .site-nav { margin: 0; }
.masthead--split .site-nav { margin-inline: auto; }

.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; flex: 0 0 auto; }
.brand img { max-height: var(--logo-h); width: auto; }
.brand__name {
	font-family: var(--f-head);
	font-weight: var(--head-weight);
	font-size: 1.42rem;
	letter-spacing: -.03em;
	color: var(--heading);
	line-height: 1.1;
}
.brand__tagline { display: block; font-family: var(--f-mono); font-size: var(--micro); color: var(--muted); letter-spacing: .03em; margin-top: .18rem; }

.site-nav { margin-left: auto; }
.site-nav ul { display: flex; align-items: center; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.site-nav li { position: relative; }
.site-nav a {
	display: inline-block;
	text-decoration: none;
	font-size: .95rem;
	font-weight: 500;
	padding: .45rem 0;
	color: var(--ink);
	border-bottom: 1.5px solid transparent;
	white-space: nowrap;
}
.site-nav a:hover, .site-nav .current-menu-item > a, .site-nav .current_page_item > a { border-bottom-color: var(--accent); }
.site-nav .sub-menu {
	display: none;
	position: absolute;
	left: 0; top: 100%;
	flex-direction: column;
	align-items: stretch;
	gap: 0;
	min-width: 210px;
	padding: .4rem;
	margin-top: .3rem;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: 0 20px 40px -24px rgba(0,0,0,.4);
	z-index: 20;
}
.site-nav .sub-menu a { display: block; padding: .5rem .7rem; border: 0; border-radius: 4px; }
.site-nav .sub-menu a:hover { background: var(--paper); }
.site-nav li:hover > .sub-menu, .site-nav li:focus-within > .sub-menu { display: flex; }

.header-tools { display: flex; align-items: center; gap: .35rem; flex: 0 0 auto; }
.icon-btn {
	width: 40px; height: 40px;
	display: grid; place-items: center;
	background: none; border: 0; border-radius: 50%;
	cursor: pointer; color: var(--ink);
	transition: background .16s var(--ease);
}
.icon-btn:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.icon-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.7; }
html[data-scheme="dark"] .i-sun { display: block; }
html[data-scheme="dark"] .i-moon { display: none; }
.i-sun { display: none; }
.nav-toggle { display: none; }

.header-search { padding-bottom: 1rem; }

/* --- search form -------------------------------------------------------- */

.searchform { display: flex; align-items: stretch; gap: 0; border: 1.5px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.searchform:focus-within { border-color: var(--accent); }
.searchform input[type="search"] { flex: 1 1 auto; min-width: 0; border: 0; background: none; padding: .7rem .9rem; outline: none; }
.searchform button { flex: 0 0 auto; border: 0; cursor: pointer; background: var(--accent); color: var(--accent-ink); padding-inline: 1.1rem; font-weight: 600; font-size: var(--small); }

/* --- page shell --------------------------------------------------------- */

.site-main { padding-block: var(--block); }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) var(--sidebar); gap: var(--gutter); align-items: start; }
.layout--left { grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.layout--left .layout__main { order: 2; }
.layout--left .layout__side { order: 1; }
.layout--none { grid-template-columns: minmax(0, 1fr); }
.layout--none .layout__main { max-width: none; }
/* With no sidebar, prose still holds its measure while grids use full width. */
.layout--none :where(.entry-header, .prose, .entry-tags, .author-box, .post-nav, .comments, .entry-thumb:not(.entry-thumb--wide), .share:not(.share--float)) {
	max-width: var(--content);
	margin-inline: auto;
}

.page-header { margin-bottom: var(--block); padding-bottom: 1.4rem; border-bottom: 1px solid var(--line); }
.page-header--center { text-align: center; }
.page-header h1 { margin-bottom: .3rem; }
.page-header p { margin: 0; color: var(--muted); }

.breadcrumbs { font-family: var(--f-mono); font-size: var(--micro); color: var(--muted); margin-bottom: 1.4rem; letter-spacing: .03em; }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span[aria-current] { color: var(--ink); }

/* --- post grid ---------------------------------------------------------- */

.grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: var(--gap); }

.card { display: flex; flex-direction: column; min-width: 0; }
.card__thumb { display: block; overflow: hidden; border-radius: var(--card-radius); background: var(--line-soft); margin-bottom: 1rem; }
.card__thumb img { width: 100%; aspect-ratio: var(--img-ratio); object-fit: cover; transition: transform .5s var(--ease), opacity .3s var(--ease); }
.card:hover .card__thumb img { transform: scale(1.03); }
.card__body { display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
.card__title { font-size: var(--h4); margin: 0; line-height: 1.25; }
.card__title a { text-decoration: none; background-image: linear-gradient(var(--accent), var(--accent)); background-size: 0 1.5px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .3s var(--ease); }
.card:hover .card__title a { background-size: 100% 1.5px; }
.card__excerpt { color: var(--muted); font-size: var(--small); margin: 0; }
.card__more { align-self: flex-start; margin-top: .2rem; }

/* Card skins. */
.cards-boxed .card { background: var(--surface); border-radius: var(--card-radius); padding: 1.1rem; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 28px -22px rgba(0,0,0,.3); }
.cards-boxed .card__thumb { margin: -1.1rem -1.1rem 1rem; border-radius: var(--card-radius) var(--card-radius) 0 0; }
.cards-bordered .card { border: 1px solid var(--line); border-radius: var(--card-radius); padding: 1.1rem; }
.cards-bordered .card__thumb { margin: -1.1rem -1.1rem 1rem; border-radius: var(--card-radius) var(--card-radius) 0 0; }
.cards-rule .card { border-top: 2px solid var(--ink); padding-top: 1rem; }

/* Overlay cards: the image is the card and the text sits on it. This is the
   image-forward skin, closer to a gallery than a reading list. */
.cards-overlay .card, .grid--overlay .card {
	position: relative;
	background: none;
	border: 0;
	padding: 0;
	box-shadow: none;
	border-radius: var(--card-radius);
	overflow: hidden;
	min-height: 220px;
	isolation: isolate;
}
.cards-overlay .card__thumb, .grid--overlay .card__thumb {
	margin: 0;
	border-radius: 0;
	height: 100%;
}
.cards-overlay .card__thumb img, .grid--overlay .card__thumb img {
	aspect-ratio: var(--img-ratio);
	height: 100%;
	object-fit: cover;
}
.cards-overlay .card__body, .grid--overlay .card__body {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	padding: 1.15rem;
	gap: .35rem;
	background: linear-gradient(to top, rgba(8,8,10,.9) 0%, rgba(8,8,10,.6) 42%, rgba(8,8,10,0) 100%);
	pointer-events: none;
}
.cards-overlay .card__body a, .grid--overlay .card__body a { pointer-events: auto; }
.cards-overlay :where(.card__title, .card__title a, .register, .register a, .card__excerpt),
.grid--overlay :where(.card__title, .card__title a, .register, .register a, .card__excerpt) { color: #fff; }
.cards-overlay .register--accent > a:first-child,
.grid--overlay .register--accent > a:first-child { color: #fff; opacity: .85; }
.cards-overlay .card__excerpt, .grid--overlay .card__excerpt { display: none; }
.cards-overlay .card__more, .grid--overlay .card__more { display: none; }
.cards-overlay .card__title a, .grid--overlay .card__title a { background-image: linear-gradient(#fff, #fff); }
/* A card with no image still needs to read, so it falls back to a tinted block. */
.cards-overlay .card:not(.has-post-thumbnail), .grid--overlay .card:not(.has-post-thumbnail) {
	background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 22%, var(--surface)), var(--surface));
	display: flex;
	align-items: flex-end;
}
.cards-overlay .card:not(.has-post-thumbnail) .card__body,
.grid--overlay .card:not(.has-post-thumbnail) .card__body { position: static; background: none; }
.cards-overlay .card:not(.has-post-thumbnail) :where(.card__title, .card__title a, .register, .register a),
.grid--overlay .card:not(.has-post-thumbnail) :where(.card__title, .card__title a, .register, .register a) { color: var(--ink); }

/* Masonry: real CSS columns, so no layout script and no shift while loading. */
.masonry { columns: var(--cols); column-gap: var(--gap); }
.masonry > * {
	break-inside: avoid;
	-webkit-column-break-inside: avoid;
	margin-bottom: var(--gap);
	display: block;
}
.masonry .card__thumb img { aspect-ratio: auto; height: auto; }
.masonry .card { min-height: 0; }

/* The featured block at the top of the home page. */
.featured { display: grid; grid-template-columns: 1.5fr 1fr; gap: var(--gap); margin-bottom: var(--block); }
.featured__side { display: grid; gap: var(--gap); align-content: stretch; }
.featured .card { min-height: 260px; }
.featured__main .card { min-height: 100%; }
.featured__main .card__title { font-size: var(--h2); }
.featured__main .card__thumb img { aspect-ratio: 4 / 3; }
.featured__side .card__thumb img { aspect-ratio: 16 / 9; }
.featured--single { grid-template-columns: 1fr; }
.featured--single .card__thumb img { aspect-ratio: 21 / 9; }

.home-intro { margin-bottom: var(--block); }
.home-intro h1 { margin-bottom: .4rem; }
.home-intro p { color: var(--muted); font-size: 1.08rem; max-width: 60ch; margin: 0; }
.home-intro--center { text-align: center; }
.home-intro--center p { margin-inline: auto; }

.section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.4rem;
	padding-bottom: .7rem;
	border-bottom: 1px solid var(--line);
}
.section-head h2 { margin: 0; font-size: var(--h3); }
.section-head a { font-family: var(--f-mono); font-size: var(--micro); text-transform: uppercase; letter-spacing: .08em; color: var(--accent); text-decoration: none; white-space: nowrap; }

/* The lead story: the first post earns more room. */
.card--lead { grid-column: 1 / -1; display: grid; grid-template-columns: 1.15fr 1fr; gap: var(--gutter); align-items: center; }
.card--lead .card__thumb { margin-bottom: 0; }
.card--lead .card__thumb img { aspect-ratio: 4 / 3; }
.card--lead .card__title { font-size: var(--h2); }
.card--lead .card__excerpt { font-size: 1rem; }

/* List layout, an alternative to the grid. */
.list .card { flex-direction: row; gap: var(--gap); align-items: flex-start; padding-bottom: var(--gap); border-bottom: 1px solid var(--line); }
.list .card:last-child { border-bottom: 0; padding-bottom: 0; }
.list .card__thumb { flex: 0 0 min(38%, 300px); margin-bottom: 0; }
.list .card__title { font-size: var(--h3); }
.list.list--noimg .card { flex-direction: column; }

.sticky-flag { display: inline-block; font-family: var(--f-mono); font-size: var(--micro); color: var(--accent); text-transform: uppercase; letter-spacing: .08em; }

/* --- pagination --------------------------------------------------------- */

.pagination { margin-top: var(--block); padding-top: 1.6rem; border-top: 1px solid var(--line); }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; align-items: center; }
.pagination .page-numbers {
	min-width: 42px; height: 42px;
	display: inline-grid; place-items: center;
	padding-inline: .75rem;
	text-decoration: none;
	font-family: var(--f-mono);
	font-size: var(--small);
	border: 1px solid var(--line);
	border-radius: var(--btn-radius);
	transition: background .16s var(--ease), color .16s var(--ease);
}
.pagination .page-numbers:hover { background: var(--surface); }
.pagination .page-numbers.current { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pagination .dots { border-color: transparent; }

.pager { display: flex; justify-content: space-between; gap: 1rem; }
.loadmore-wrap { display: grid; place-items: center; gap: .7rem; margin-top: var(--block); }
.loadmore-status { margin: 0; color: var(--muted); font-size: var(--small); }

/* --- single post -------------------------------------------------------- */

.entry-header { margin-bottom: 2rem; }
.entry-header--center { text-align: center; }
.entry-header--center .register { justify-content: center; }
.entry-title { margin-bottom: .6rem; }
.entry-lede { font-size: 1.12rem; color: var(--muted); margin: 0 0 1rem; max-width: 62ch; }
.entry-header--center .entry-lede { margin-inline: auto; }
.entry-thumb { margin-bottom: 2rem; }
.entry-thumb img { width: 100%; border-radius: var(--card-radius); }
.entry-thumb figcaption { font-family: var(--f-mono); font-size: var(--micro); color: var(--muted); margin-top: .5rem; }
.entry-thumb--wide { width: 100vw; max-width: 100vw; margin-left: 50%; transform: translateX(-50%); }
.entry-thumb--wide img { border-radius: 0; max-height: 62vh; object-fit: cover; }

/* --- prose -------------------------------------------------------------- */

.prose { max-width: var(--content); }
.prose > * + * { margin-top: var(--flow); }
.prose :where(h2, h3, h4) { margin-top: 1.9em; margin-bottom: .5em; }
.prose h2 { font-size: var(--h2); }
.prose h3 { font-size: var(--h3); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose ul, .prose ol { padding-left: 1.35em; }
.prose li + li { margin-top: .35em; }
.prose img, .prose figure img { border-radius: var(--card-radius); }
.prose figure { margin: var(--flow) 0; }
.prose figcaption { font-family: var(--f-mono); font-size: var(--micro); color: var(--muted); margin-top: .6rem; text-align: center; }
.prose blockquote {
	margin: 1.8em 0;
	padding: .2rem 0 .2rem 1.4rem;
	border-left: 3px solid var(--accent);
	font-size: 1.08em;
	color: var(--ink);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose code { font-family: var(--f-mono); font-size: .88em; background: var(--line-soft); padding: .15em .4em; border-radius: 3px; }
.prose pre { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; overflow: auto; }
.prose pre code { background: none; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--small); }
.prose th, .prose td { border: 1px solid var(--line); padding: .55rem .8rem; text-align: left; }
.prose th { background: var(--surface); font-weight: 600; }
.alignwide { width: min(100vw - (var(--pad) * 2), calc(var(--content) + 180px)); max-width: none; margin-inline: calc(50% - min(50vw - var(--pad), (var(--content) + 180px) / 2)); }
.alignfull { width: 100vw; max-width: 100vw; margin-left: 50%; transform: translateX(-50%); }
.alignleft { float: left; margin: .3em 1.5em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.5em; }
.aligncenter { margin-inline: auto; }

/* --- post furniture ----------------------------------------------------- */

.entry-tags { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 2.4rem 0 0; padding: 0; }
.entry-tags a { display: inline-block; padding: .3rem .7rem; font-size: var(--micro); font-family: var(--f-mono); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
.entry-tags a:hover { border-color: var(--accent); color: var(--accent); }

.author-box { display: flex; gap: 1.2rem; align-items: flex-start; margin-top: var(--block); padding: 1.4rem; background: var(--surface); border-radius: var(--card-radius); }
.author-box img { border-radius: 50%; flex: 0 0 auto; }
.author-box h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.author-box p { margin: 0; color: var(--muted); font-size: var(--small); }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); margin-top: var(--block); padding-top: 1.6rem; border-top: 1px solid var(--line); }
.post-nav a { text-decoration: none; display: block; }
.post-nav__label { font-family: var(--f-mono); font-size: var(--micro); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); display: block; margin-bottom: .35rem; }
.post-nav__title { font-family: var(--f-head); font-weight: var(--head-weight); font-size: 1.02rem; line-height: 1.3; color: var(--heading); }
.post-nav a:hover .post-nav__title { color: var(--accent); }
.post-nav__next { text-align: right; }

.related { margin-top: var(--block); padding-top: 1.8rem; border-top: 1px solid var(--line); }
.related__title { font-size: var(--h3); margin-bottom: 1.4rem; }

.toc { background: var(--surface); border-left: 3px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; padding: 1.1rem 1.3rem; margin-bottom: 2rem; }
.toc__title { font-family: var(--f-mono); font-size: var(--micro); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 .7rem; }
.toc ol { margin: 0; padding-left: 1.2em; font-size: var(--small); }
.toc li + li { margin-top: .3em; }
.toc a { text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }

.reading-bar { position: fixed; top: 0; left: 0; height: 3px; background: var(--accent); z-index: 100; width: 0; transition: width .1s linear; }

/* --- share -------------------------------------------------------------- */

.share { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.share__label { font-family: var(--f-mono); font-size: var(--micro); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-right: .3rem; }
.share__btn {
	width: 38px; height: 38px;
	display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
	border: 1px solid var(--line); border-radius: var(--radius);
	background: none; cursor: pointer; color: var(--ink); text-decoration: none;
	transition: background .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease);
}
.share__btn:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.share__btn svg { width: 17px; height: 17px; fill: currentColor; stroke: none; }
.share__btn svg.is-line { fill: none; stroke: currentColor; stroke-width: 1.9; }
.share--round .share__btn { border-radius: 50%; }
.share--labelled .share__btn { width: auto; padding-inline: .85rem; font-size: var(--small); font-weight: 600; }
.share--brand .share__btn { border-color: transparent; color: #fff; }
.share--brand .share__btn:hover { filter: brightness(1.12); }
.share--brand .share__btn--facebook { background: #1877f2; }
.share--brand .share__btn--x { background: #101114; }
.share--brand .share__btn--linkedin { background: #0a66c2; }
.share--brand .share__btn--whatsapp { background: #25d366; }
.share--brand .share__btn--telegram { background: #2aabee; }
.share--brand .share__btn--pinterest { background: #e60023; }
.share--brand .share__btn--reddit { background: #ff4500; }
.share--brand .share__btn--link { background: var(--ink); color: var(--paper); }
.share--float { position: fixed; left: 12px; top: 50%; transform: translateY(-50%); flex-direction: column; z-index: 50; }

/* --- sidebar and widgets ------------------------------------------------ */

.sidebar { position: sticky; top: 1.5rem; display: grid; gap: var(--gap); }
.sidebar--static { position: static; }
.widget { font-size: var(--small); }
.widget-title { font-family: var(--f-mono); font-size: var(--micro); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 .9rem; padding-bottom: .6rem; border-bottom: 1px solid var(--line); }
.widget ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.widget li { line-height: 1.45; }
.widget a { text-decoration: none; }
.widget a:hover { color: var(--accent); }
.widget .children { margin-top: .55rem; padding-left: 1rem; }
.widgets-boxed .widget { background: var(--surface); padding: 1.2rem; border-radius: var(--card-radius); }
.widgets-bordered .widget { border: 1px solid var(--line); padding: 1.2rem; border-radius: var(--card-radius); }
.widget select { width: 100%; padding: .5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.widget_search .searchform { margin: 0; }

/* --- footer ------------------------------------------------------------- */

.site-footer { background: var(--surface); border-top: 1px solid var(--line); margin-top: var(--block); }
.footer-widgets { display: grid; grid-template-columns: repeat(var(--footer-cols, 3), minmax(0, 1fr)); gap: var(--gutter); padding-block: var(--block); }
.footer-bottom { border-top: 1px solid var(--line); padding-block: 1.3rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: var(--small); color: var(--muted); }
.footer-bottom p { margin: 0; }
.footer-menu ul { display: flex; flex-wrap: wrap; gap: 1.1rem; list-style: none; margin: 0; padding: 0; }
.footer-menu a { text-decoration: none; }
.footer-menu a:hover { color: var(--accent); }

.to-top {
	position: fixed; right: 18px; bottom: 18px; z-index: 55;
	width: 44px; height: 44px;
	display: grid; place-items: center;
	border: 0; border-radius: var(--radius);
	background: var(--ink); color: var(--paper);
	cursor: pointer; opacity: 0; pointer-events: none;
	transform: translateY(10px);
	transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.to-top.is-on { opacity: 1; pointer-events: auto; transform: translateY(0); }
.to-top svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 2; }

/* --- comments ----------------------------------------------------------- */

.comments { margin-top: var(--block); padding-top: 1.8rem; border-top: 1px solid var(--line); max-width: var(--content); }
.comment-list { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; gap: 1.6rem; }
.comment-list .children { list-style: none; margin: 1.6rem 0 0; padding-left: 1.6rem; border-left: 1px solid var(--line); display: grid; gap: 1.6rem; }
.comment-body { font-size: var(--small); }
.comment-meta { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.comment-author img { border-radius: 50%; }
.comment-metadata { font-family: var(--f-mono); font-size: var(--micro); color: var(--muted); }
.comment-respond input[type="text"], .comment-respond input[type="email"], .comment-respond input[type="url"], .comment-respond textarea {
	width: 100%; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.comment-respond label { display: block; font-size: var(--small); margin-bottom: .3rem; }
.comment-respond p { margin-bottom: 1rem; }
.comment-form-cookies-consent { display: flex; align-items: center; gap: .5rem; }
.comment-form-cookies-consent input { width: auto; }

/* --- empty and 404 ------------------------------------------------------ */

.notice { padding: 3rem 1rem; text-align: center; color: var(--muted); }
.notice strong { display: block; color: var(--ink); font-family: var(--f-head); font-size: 1.15rem; margin-bottom: .4rem; }
.error-code { font-family: var(--f-head); font-size: clamp(4rem, 16vw, 9rem); line-height: .9; color: var(--accent); margin: 0 0 .5rem; }

/* --- responsive --------------------------------------------------------- */

@media (max-width: 1100px) {
	:root { --gutter: 40px; }
	.layout, .layout--left { grid-template-columns: minmax(0, 1fr); }
	.layout--left .layout__main, .layout--left .layout__side { order: 0; }
	.sidebar { position: static; }
	.share--float { position: static; transform: none; flex-direction: row; }
}

@media (max-width: 860px) {
	:root { --cols: var(--cols-tablet, 2); --block: 44px; }
	.featured { grid-template-columns: 1fr; }
	.featured__main .card__thumb img { aspect-ratio: 16 / 9; }
	.card--lead { grid-template-columns: 1fr; gap: 1.2rem; }
	.footer-widgets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.site-nav {
		display: none;
		position: absolute; left: 0; right: 0; top: 100%;
		background: var(--surface);
		border-bottom: 1px solid var(--line);
		padding: .8rem var(--pad) 1.3rem;
		max-height: 76vh; overflow-y: auto;
	}
	.site-nav.is-open { display: block; }
	.site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
	.site-nav a { display: block; padding: .8rem 0; border-bottom: 1px solid var(--line-soft); }
	.site-nav .sub-menu { position: static; display: flex; border: 0; box-shadow: none; padding: 0 0 0 1rem; margin: 0; }
	.nav-toggle { display: grid; }
	.masthead { position: relative; }
	.brand__tagline { display: none; }
	.entry-thumb--wide img { max-height: 42vh; }
}

@media (max-width: 560px) {
	:root { --cols: var(--cols-mobile, 1); --gap: 28px; --pad: 18px; --gutter: 28px; }
	.list .card { flex-direction: column; gap: 1rem; }
	.list .card__thumb { flex: none; width: 100%; }
	.footer-widgets { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
	.post-nav { grid-template-columns: 1fr; }
	.post-nav__next { text-align: left; }
	.author-box { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: .01ms !important;
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}
}

@media print {
	.site-header, .site-footer, .sidebar, .share, .to-top, .post-nav, .related, .comments, .reading-bar { display: none !important; }
	body { background: #fff; color: #000; font-size: 12pt; }
	.prose { max-width: none; }
}
