/*
Theme Name: bttr-style
Theme URI: https://bttr.blog
Description: A minimalist, book-like WordPress theme designed for the bttr.blog site. The reading experience is inspired by e-readers like the Amazon Kindle: white background, black text, generous line-height, and the elegant Libre Baskerville typeface (a free, web-safe alternative to classical Baskerville). It includes a rich set of typographic styles for long-form writing: pull quotes, highlighted paragraphs, callout boxes, footnotes, drop caps, asides, epigraphs, ornamental dividers, and more.
Version: 1.5.0
Author: bttr.blog
Author URI: https://bttr.blog
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bttr-style
Tags: light, white, black, minimalist, reading, blog, two-columns, custom-menu, custom-header, editor-style, full-width-template, responsive-layout, accessibility-ready

Based on Libre, (C) Automattic. Libre is licensed under GPL v2 or later.
This derivative theme, like WordPress, is licensed under the GPL.
*/

/*--------------------------------------------------------------
>>> TABLE OF CONTENTS
----------------------------------------------------------------
# Reset & Normalize
# Variables
# Base Typography (Kindle-like reading)
# Layout
# Site Header
# Navigation
# Site Content
# Posts & Pages
# Book / Reading Typography
    ## Drop caps
    ## Pull quotes & block quotes
    ## Highlighted paragraphs
    ## Callout / aside boxes
    ## Footnotes
    ## Epigraphs
    ## Ornamental dividers
    ## Marginalia
    ## Verse & poetry
    ## Definitions
    ## Chapter / section openers
# Comments
# Widgets
# Footer
# Media
# Forms
# Accessibility
# Print
# Responsive
--------------------------------------------------------------*/


/*--------------------------------------------------------------
# Reset & Normalize
--------------------------------------------------------------*/
*, *::before, *::after { box-sizing: border-box; }

html {
	font-family: serif;
	-webkit-text-size-adjust: 100%;
	-ms-text-size-adjust: 100%;
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

body {
	margin: 0;
	padding: 0;
}

article, aside, details, figcaption, figure, footer, header, main, menu, nav, section, summary { display: block; }

audio, canvas, progress, video { display: inline-block; vertical-align: baseline; }

a { background-color: transparent; }
a:active, a:hover { outline: 0; }

img { border: 0; max-width: 100%; height: auto; }

button, input, optgroup, select, textarea {
	color: inherit;
	font: inherit;
	margin: 0;
}

table { border-collapse: collapse; border-spacing: 0; }


/*--------------------------------------------------------------
# Variables
--------------------------------------------------------------*/
:root {
	/* Color palette — pure Kindle */
	--bttr-bg: #ffffff;
	--bttr-text: #111111;
	--bttr-muted: #6b6b6b;
	--bttr-light: #d8d8d8;
	--bttr-line: #e6e6e6;
	--bttr-accent: #000000;
	--bttr-highlight: #fff8c5; /* very subtle paper-yellow */
	--bttr-callout-bg: #f7f5ef;
	--bttr-callout-border: #cfcabb;

	/* Aliases (used by the hardcoded logo markup in header.php) */
	--color-text-primary: #111111;

	/* Typography */
	--bttr-serif: 'Libre Baskerville', 'Baskerville', 'Baskerville Old Face', 'Hoefler Text', Garamond, 'Times New Roman', Times, serif;
	--bttr-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
	--bttr-mono: 'Menlo', 'Consolas', 'Courier New', monospace;

	/* Reading metrics */
	--bttr-content-width: 1100px;
	--bttr-page-width: 1100px;
	--bttr-base-size: 16px;
	--bttr-line-height: 1.78;
	--bttr-paragraph-spacing: 1.4em;

	/* Rhythm */
	--bttr-radius: 2px;
}


/*--------------------------------------------------------------
# Base Typography
--------------------------------------------------------------*/
html { font-size: var(--bttr-base-size); }

body {
	background: var(--bttr-bg);
	color: var(--bttr-text);
	font-family: var(--bttr-serif);
	font-size: 1rem;
	line-height: var(--bttr-line-height);
	font-weight: 400;
	-webkit-hyphens: auto;
	-ms-hyphens: auto;
	hyphens: auto;
}

p {
	margin: 0 0 var(--bttr-paragraph-spacing);
	text-align: justify;
	hyphens: auto;
	-webkit-hyphens: auto;
}

/* The first paragraph after a heading should not be indented */
h1 + p, h2 + p, h3 + p, h4 + p, h5 + p, h6 + p,
.entry-content > p:first-of-type { text-indent: 0; }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--bttr-serif);
	font-weight: 700;
	color: var(--bttr-text);
	line-height: 1.25;
	margin: 2em 0 0.6em;
	letter-spacing: -0.005em;
}

h1 { font-size: 2.2rem; margin-top: 0; }
h2 { font-size: 1.65rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }
h5 { font-size: 1rem; text-transform: capitalize; letter-spacing: 0.08em; }
h6 { font-size: 0.95rem; color: var(--bttr-muted); }

a {
	color: var(--bttr-text);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: color 120ms ease, text-decoration-color 120ms ease;
}
a:hover, a:focus { color: var(--bttr-muted); text-decoration-color: var(--bttr-muted); }

strong, b { font-weight: 700; }
em, i, cite, dfn { font-style: italic; }
small { font-size: 0.82em; color: var(--bttr-muted); }
mark, ins {
	background: var(--bttr-highlight);
	color: var(--bttr-text);
	text-decoration: none;
	padding: 0 0.1em;
}
del, s { color: var(--bttr-muted); text-decoration: line-through; }
abbr[title] { border-bottom: 1px dotted var(--bttr-muted); cursor: help; text-decoration: none; }
sup, sub { font-size: 0.72em; line-height: 0; position: relative; vertical-align: baseline; }
sup { top: -0.5em; }
sub { bottom: -0.25em; }

code, kbd, samp, pre {
	font-family: var(--bttr-mono);
	font-size: 0.9em;
}
code { background: var(--bttr-callout-bg); padding: 0.1em 0.35em; border-radius: var(--bttr-radius); }
pre {
	background: var(--bttr-callout-bg);
	padding: 1em 1.2em;
	border-left: 3px solid var(--bttr-line);
	overflow-x: auto;
	line-height: 1.55;
	margin: 1.6em 0;
}
pre code { background: transparent; padding: 0; }

blockquote {
	margin: 1.6em 0;
	padding: 0 0 0 1.4em;
	border-left: 3px solid var(--bttr-line);
	font-style: italic;
	color: var(--bttr-text);
}
blockquote p { text-align: left; }
blockquote cite { display: block; margin-top: 0.6em; font-size: 0.85em; color: var(--bttr-muted); font-style: normal; }
blockquote cite::before { content: '— '; }

hr {
	border: 0;
	height: 1px;
	background: var(--bttr-line);
	margin: 2.5em auto;
	max-width: 60%;
}

ul, ol { margin: 0 0 var(--bttr-paragraph-spacing); padding-left: 1.6em; }
li { margin-bottom: 0.4em; }
li > ul, li > ol { margin-bottom: 0.4em; }

dl { margin: 1em 0; }
dt { font-weight: 700; }
dd { margin: 0 0 1em 1.5em; }

table {
	width: 100%;
	margin: 1.6em 0;
	font-size: 0.95em;
}
th, td {
	text-align: left;
	padding: 0.6em 0.8em;
	border-bottom: 1px solid var(--bttr-line);
}
th {
	font-weight: 700;
	border-bottom: 2px solid var(--bttr-text);
}

/* Selection — soft like e-ink highlight */
::selection { background: var(--bttr-highlight); color: var(--bttr-text); }
::-moz-selection { background: var(--bttr-highlight); color: var(--bttr-text); }


/*--------------------------------------------------------------
# Layout
--------------------------------------------------------------*/
#page {
	max-width: var(--bttr-page-width);
	margin: 0 auto;
	padding: 0 32px;
}

.site-content {
	padding: 1em 0 4em;
}

.content-area { max-width: var(--bttr-content-width); margin: 0 auto; }


/*--------------------------------------------------------------
# Site Header — logo left, menu right
--------------------------------------------------------------*/
.site-header {
	padding: 2.4em 0 1.8em;
	border-bottom: 1px solid var(--bttr-line);
	margin-bottom: 3em;
}

.site-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2em;
	flex-wrap: wrap;
}

.site-branding {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	text-align: left;
	margin: 0;
	flex: 0 1 auto;
	min-width: 0;
}

.site-logo { margin-bottom: 0.4em; }
.site-logo img {
	display: block;
	max-height: 96px;
	width: auto;
	height: auto;
}

.site-title {
	margin: 0;
	font-size: 2.1rem;
	font-weight: 700;
	letter-spacing: 0.01em;
	line-height: 1;
}
.site-title a {
	text-decoration: none;
	color: var(--bttr-text);
	display: inline-block;
	line-height: 1;
}
.site-title a:hover { opacity: 0.7; }
/* The hardcoded bttr.blog logo lives inside .site-title a — keep the link from underlining the spans */
.site-title a span { vertical-align: baseline; }

.site-description {
	margin: 0.3em 0 0;
	font-size: 0.92rem;
	color: var(--bttr-muted);
	font-style: italic;
}


/*--------------------------------------------------------------
# Navigation — to the right of the logo
--------------------------------------------------------------*/
.main-navigation {
	display: block;
	font-size: 0.98rem;
	flex: 0 0 auto;
	margin-left: auto;
}

.main-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	align-items: center;
	gap: 1.6em;
}

.main-navigation a {
	text-decoration: none;
	color: var(--bttr-text);
	border-bottom: 1px solid transparent;
	padding-bottom: 2px;
	transition: border-color 120ms ease, color 120ms ease;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a {
	border-bottom-color: var(--bttr-text);
}

.main-navigation li { margin: 0; }

.menu-toggle {
	display: none;
	background: transparent;
	border: 1px solid var(--bttr-text);
	padding: 0.4em 0.9em;
	font-family: var(--bttr-serif);
	font-size: 0.9rem;
	cursor: pointer;
	color: var(--bttr-text);
}

@media (max-width: 720px) {
	.site-header-inner { flex-direction: column; align-items: flex-start; gap: 1em; }
	.main-navigation { width: 100%; margin-left: 0; }
	.menu-toggle { display: inline-block; }
	.main-navigation > ul,
	.main-navigation #primary-menu {
		display: none;
		flex-direction: column;
		gap: 0.6em;
		margin-top: 0.8em;
		justify-content: flex-start;
		align-items: flex-start;
	}
	.main-navigation.toggled > ul,
	.main-navigation.toggled #primary-menu { display: flex; }

	/* On mobile, render nested dropdowns inline rather than as a popover.
	   Hidden by default, shown only when the parent has .is-open. */
	.main-navigation .sub-menu {
		display: none;
		position: static;
		transform: none;
		opacity: 1;
		visibility: visible;
		border: none;
		box-shadow: none;
		background: transparent;
		padding: 0.2em 0 0.2em 1em;
		min-width: 0;
		transition: none;
	}
	.main-navigation .menu-item-has-children.is-open > .sub-menu {
		display: flex;
	}
	/* Hover doesn't reliably exist on touch — disable hover trigger on mobile */
	.main-navigation .menu-item-has-children:hover > .sub-menu,
	.main-navigation .menu-item-has-children:focus-within > .sub-menu {
		display: none;
	}
	.main-navigation .menu-item-has-children.is-open > .sub-menu {
		display: flex;
	}
}

/* --- Dropdowns (nested .sub-menu, incl. Polylang language switcher) --- */
.main-navigation .menu-item-has-children { position: relative; }

/* Small black triangle next to parent items with children */
.main-navigation .menu-item-has-children > a::after {
	content: '';
	display: inline-block;
	width: 0;
	height: 0;
	margin-left: 0.45em;
	vertical-align: 0.18em;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid currentColor;
	transition: transform 150ms ease;
}

/* The dropdown panel — hidden by default */
.main-navigation .sub-menu {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: flex-start;
	gap: 0;
	list-style: none;
	margin: 0;
	padding: 0.35em 0;
	position: absolute;
	top: 100%;
	right: 0;
	min-width: 11em;
	background: var(--bttr-bg);
	border: 1px solid var(--bttr-line);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
	border-radius: var(--bttr-radius);
	text-align: left;
	z-index: 50;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	transition: opacity 150ms ease, transform 150ms ease, visibility 0s linear 150ms;
}

/* Reveal on hover, keyboard focus, or after a click (.is-open is added by JS) */
.main-navigation .menu-item-has-children:hover > .sub-menu,
.main-navigation .menu-item-has-children:focus-within > .sub-menu,
.main-navigation .menu-item-has-children.is-open > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	transition-delay: 0s;
}

/* Flip the triangle when the dropdown is open */
.main-navigation .menu-item-has-children:hover > a::after,
.main-navigation .menu-item-has-children:focus-within > a::after,
.main-navigation .menu-item-has-children.is-open > a::after {
	transform: rotate(180deg);
}

.main-navigation .sub-menu li {
	margin: 0;
}
.main-navigation .sub-menu a {
	display: block;
	padding: 0.4em 1em;
	white-space: nowrap;
	border-bottom: none;
	text-decoration: none;
}
.main-navigation .sub-menu a:hover,
.main-navigation .sub-menu .current-menu-item > a {
	background: var(--bttr-callout-bg);
	border-bottom: none;
}

/* Polylang language switcher: parent link points to #pll_switcher — avoid the
   default cursor jump and the focus underline once the dropdown is open. */
.main-navigation a[href="#pll_switcher"] { cursor: default; }


.post-navigation {
	margin: 3em 0 2em;
	padding: 1.4em 0;
	border-top: 1px solid var(--bttr-line);
	border-bottom: 1px solid var(--bttr-line);
	font-size: 0.95rem;
}
.post-navigation .nav-links { display: flex; justify-content: space-between; gap: 1em; }
.post-navigation .meta-nav {
	display: block;
	font-size: 0.78rem;
	letter-spacing: 0.1em;
	text-transform: capitalize;
	color: var(--bttr-muted);
	margin-bottom: 0.3em;
}
.post-navigation a { text-decoration: none; }
.post-navigation a:hover { color: var(--bttr-muted); }


/*--------------------------------------------------------------
# Posts & Pages
--------------------------------------------------------------*/
.entry-header {
	margin-bottom: 2.4em;
	text-align: left;
}

.entry-title {
	font-size: 2.4rem;
	line-height: 1.2;
	margin: 0 0 0.4em;
	letter-spacing: -0.01em;
}
.entry-title a { text-decoration: none; color: var(--bttr-text); }
.entry-title a:hover { color: var(--bttr-muted); }

.entry-meta {
	font-size: 0.82rem;
	letter-spacing: 0.08em;
	text-transform: capitalize;
	color: var(--bttr-muted);
}
.entry-meta a { color: var(--bttr-muted); text-decoration: none; }
.entry-meta a:hover { color: var(--bttr-text); }
.entry-meta .byline,
.entry-meta .posted-on,
.entry-meta .cat-links,
.entry-meta .tags-links { margin: 0 0.6em; }

.entry-footer {
	margin: 2.2em 0;
	padding-top: 1.2em;
	border-top: 1px solid var(--bttr-line);
	font-size: 0.85rem;
	color: var(--bttr-muted);
}
.entry-footer a { color: var(--bttr-muted); }
.entry-footer .cat-links,
.entry-footer .tags-links { display: block; margin-bottom: 0.4em; }

article + article { margin-top: 4em; padding-top: 3em; border-top: 1px solid var(--bttr-line); }

.page .entry-title { font-size: 2rem; }


/*--------------------------------------------------------------
# Book / Reading Typography
# These classes are intended for use inside .entry-content
--------------------------------------------------------------*/

/* ---------- Drop caps ---------- */
.entry-content .has-drop-cap:not(:focus):first-letter,
.entry-content p.dropcap:first-letter {
	float: left;
	font-family: var(--bttr-serif);
	font-size: 4.2em;
	line-height: 0.85;
	font-weight: 700;
	margin: 0.08em 0.12em 0 0;
	color: var(--bttr-text);
}

/* ---------- Pull quotes ---------- */
.entry-content .pullquote,
.entry-content blockquote.pullquote,
.entry-content .wp-block-pullquote {
	border-left: none;
	border-top: 2px solid var(--bttr-text);
	border-bottom: 2px solid var(--bttr-text);
	margin: 2.2em auto;
	padding: 1.4em 0;
	max-width: 90%;
	text-align: center;
	font-size: 1.35em;
	line-height: 1.45;
	font-style: italic;
	color: var(--bttr-text);
}
.entry-content .pullquote p,
.entry-content blockquote.pullquote p,
.entry-content .wp-block-pullquote p { text-align: center; margin: 0; }
.entry-content .pullquote cite,
.entry-content blockquote.pullquote cite,
.entry-content .wp-block-pullquote cite {
	display: block;
	margin-top: 0.8em;
	font-size: 0.7em;
	letter-spacing: 0.12em;
	text-transform: capitalize;
	font-style: normal;
	color: var(--bttr-muted);
}
.entry-content .pullquote cite::before,
.entry-content blockquote.pullquote cite::before { content: ''; }

/* ---------- Highlighted paragraph ---------- */
.entry-content p.highlight,
.entry-content .highlight-paragraph {
	background: var(--bttr-highlight);
	padding: 1em 1.2em;
	border-radius: var(--bttr-radius);
	text-indent: 0;
}

/* ---------- Lead paragraph (larger first paragraph) ---------- */
.entry-content p.lead,
.entry-content .has-large-font-size,
.entry-content > p.lead {
	font-size: 1.18em;
	line-height: 1.65;
	color: var(--bttr-text);
	font-style: italic;
}

/* ---------- Callout / aside box ---------- */
.entry-content .callout,
.entry-content aside.callout {
	background: var(--bttr-callout-bg);
	border: 1px solid var(--bttr-callout-border);
	border-left: 3px solid var(--bttr-text);
	padding: 1.2em 1.4em;
	margin: 2em 0;
	font-size: 0.95em;
	border-radius: var(--bttr-radius);
}
.entry-content .callout > *:first-child { margin-top: 0; }
.entry-content .callout > *:last-child { margin-bottom: 0; }
.entry-content .callout .callout-title,
.entry-content .callout-title {
	display: block;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: capitalize;
	font-size: 0.78em;
	margin-bottom: 0.4em;
	color: var(--bttr-text);
	font-style: normal;
}

/* Variants */
.entry-content .callout.note { border-left-color: #4a4a4a; }
.entry-content .callout.warning { border-left-color: #b54a2c; background: #fbf3ef; }
.entry-content .callout.info { border-left-color: #2c5b8c; background: #f0f4f9; }
.entry-content .callout.tip { border-left-color: #3d7a3a; background: #f1f6f0; }

/* ---------- Footnotes ---------- */
.entry-content .footnote-ref,
.entry-content sup.footnote {
	font-size: 0.72em;
	line-height: 0;
	vertical-align: super;
}
.entry-content .footnote-ref a,
.entry-content sup.footnote a {
	text-decoration: none;
	font-weight: 700;
	padding: 0 0.15em;
}

.entry-content .footnotes,
.entry-content ol.footnotes,
.entry-content .footnotes-list {
	margin: 3em 0 1.5em;
	padding: 1.4em 0 0;
	border-top: 1px solid var(--bttr-line);
	font-size: 0.86em;
	line-height: 1.55;
	color: var(--bttr-text);
	counter-reset: footnote;
}
.entry-content .footnotes::before,
.entry-content ol.footnotes::before {
	content: 'Notas';
	display: block;
	font-size: 0.78em;
	letter-spacing: 0.14em;
	text-transform: capitalize;
	font-weight: 700;
	margin-bottom: 0.8em;
	color: var(--bttr-muted);
}
.entry-content .footnotes ol,
.entry-content ol.footnotes { padding-left: 1.6em; }
.entry-content .footnotes li,
.entry-content ol.footnotes li { margin-bottom: 0.6em; }

/* ---------- Epigraph (chapter opener quote) ---------- */
.entry-content .epigraph {
	max-width: 80%;
	margin: 0 auto 2.5em;
	font-style: italic;
	text-align: right;
	font-size: 0.95em;
	color: var(--bttr-text);
	border: none;
	padding: 0;
}
.entry-content .epigraph p { text-align: right; margin: 0 0 0.4em; }
.entry-content .epigraph cite,
.entry-content .epigraph .epigraph-attribution {
	display: block;
	font-size: 0.85em;
	color: var(--bttr-muted);
	font-style: normal;
	letter-spacing: 0.04em;
}
.entry-content .epigraph cite::before { content: '— '; }

/* ---------- Ornamental dividers ---------- */
.entry-content .ornament,
.entry-content hr.ornament {
	border: 0;
	background: none;
	height: auto;
	max-width: none;
	text-align: center;
	margin: 2.4em 0;
	color: var(--bttr-muted);
	font-size: 1.2em;
	letter-spacing: 0.6em;
}
.entry-content .ornament::before,
.entry-content hr.ornament::after { content: '❦'; }
.entry-content hr.ornament::after { content: ''; }
.entry-content hr.ornament { display: block; }
.entry-content hr.ornament::before {
	content: '❦';
	display: block;
}

/* Three asterisks divider (book-style scene break) */
.entry-content hr.asterism { color: var(--bttr-muted); }
.entry-content hr.asterism { background: none; height: auto; max-width: none; }
.entry-content hr.asterism::before {
	content: '* * *';
	display: block;
	text-align: center;
	letter-spacing: 0.7em;
	color: var(--bttr-muted);
	font-size: 1.1em;
}

/* ---------- Marginalia (side notes on wide screens) ---------- */
.entry-content .marginalia {
	display: block;
	margin: 1em 0;
	padding: 0.6em 1em;
	border-left: 2px solid var(--bttr-light);
	color: var(--bttr-muted);
	font-size: 0.88em;
	font-style: italic;
}
@media (min-width: 1100px) {
	.entry-content .marginalia {
		float: right;
		clear: right;
		width: 220px;
		margin-right: -260px;
		margin-top: 0.3em;
		border-left: none;
		padding: 0 0 0 1em;
		border-left: 1px solid var(--bttr-light);
		text-align: left;
		font-size: 0.82em;
	}
}

/* ---------- Verse / poetry ---------- */
.entry-content .verse,
.entry-content .wp-block-verse {
	font-family: var(--bttr-serif);
	font-style: italic;
	white-space: pre-wrap;
	margin: 1.6em 0 1.6em 1.4em;
	line-height: 1.6;
	color: var(--bttr-text);
}

/* ---------- Definitions / glossary ---------- */
.entry-content .definition {
	margin: 1.6em 0;
	padding: 0.8em 1em 0.8em 1.2em;
	border-left: 3px solid var(--bttr-text);
	font-size: 0.95em;
}
.entry-content .definition .term {
	display: block;
	font-weight: 700;
	font-style: italic;
	margin-bottom: 0.3em;
}

/* ---------- Chapter / section openers ---------- */
.entry-content .chapter-opener {
	text-align: center;
	margin: 2.5em 0 1.8em;
}
.entry-content .chapter-opener .chapter-number {
	display: block;
	font-size: 0.78em;
	letter-spacing: 0.4em;
	text-transform: capitalize;
	color: var(--bttr-muted);
	margin-bottom: 0.5em;
}
.entry-content .chapter-opener .chapter-title {
	font-size: 1.8em;
	font-weight: 700;
	margin: 0;
	letter-spacing: -0.005em;
}

/* Small caps run-in (book-style) */
.entry-content .smallcaps {
	font-variant: small-caps;
	letter-spacing: 0.04em;
}

/* Centered text utility */
.entry-content .center { text-align: center; }
.entry-content .right { text-align: right; }
.entry-content .left { text-align: left; }

/* No-indent / first-line indent variants */
.entry-content.indent-paragraphs p + p { text-indent: 1.6em; }
.entry-content p.no-indent { text-indent: 0; }


/*--------------------------------------------------------------
# Comments
--------------------------------------------------------------*/
.comments-area {
	margin: 3em 0;
	padding-top: 2em;
	border-top: 1px solid var(--bttr-line);
}

.comments-title {
	font-size: 1.2rem;
	letter-spacing: 0.04em;
	margin-bottom: 1.4em;
}

.comment-list { list-style: none; padding: 0; margin: 0 0 2em; }
.comment-list .children { list-style: none; padding-left: 1.4em; border-left: 1px solid var(--bttr-line); }

.comment-body {
	padding: 1em 0;
	border-bottom: 1px solid var(--bttr-line);
	font-size: 0.95rem;
}

.comment-meta { font-size: 0.82rem; color: var(--bttr-muted); margin-bottom: 0.5em; }
.comment-meta .fn { font-weight: 700; font-style: normal; color: var(--bttr-text); }
.comment-meta a { text-decoration: none; }

.comment-content p { text-align: left; }

.reply a, .edit-link a {
	display: inline-block;
	margin-top: 0.4em;
	font-size: 0.78rem;
	text-transform: capitalize;
	letter-spacing: 0.1em;
	text-decoration: none;
}

.comment-form label { display: block; margin-bottom: 0.3em; font-size: 0.85rem; color: var(--bttr-muted); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 0.6em 0.8em;
	border: 1px solid var(--bttr-line);
	background: var(--bttr-bg);
	font-family: var(--bttr-serif);
	font-size: 1rem;
	border-radius: var(--bttr-radius);
}
.comment-form .form-submit input[type="submit"] {
	background: var(--bttr-text);
	color: var(--bttr-bg);
	border: none;
	padding: 0.7em 1.6em;
	font-family: var(--bttr-serif);
	font-size: 0.95rem;
	cursor: pointer;
	border-radius: var(--bttr-radius);
	letter-spacing: 0.04em;
	transition: background 120ms ease;
}
.comment-form .form-submit input[type="submit"]:hover { background: var(--bttr-muted); }


/*--------------------------------------------------------------
# Widgets / Sidebar
--------------------------------------------------------------*/
.widget-area { margin-top: 2em; font-size: 0.95rem; }
.widget {
	margin: 0 0 2em;
	padding: 0;
}
.widget-title {
	font-size: 0.82rem;
	letter-spacing: 0.14em;
	text-transform: capitalize;
	margin: 0 0 0.8em;
	color: var(--bttr-muted);
}
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li {
	margin-bottom: 0.4em;
	border-bottom: 1px dotted var(--bttr-line);
	padding-bottom: 0.4em;
}
.widget a { text-decoration: none; }
.widget a:hover { text-decoration: underline; }

.widget .post-count { color: var(--bttr-muted); font-size: 0.85em; margin-left: 0.3em; }

.widget input[type="search"],
.widget input[type="text"] {
	width: 100%;
	padding: 0.5em 0.7em;
	border: 1px solid var(--bttr-line);
	font-family: var(--bttr-serif);
	font-size: 0.95rem;
	background: var(--bttr-bg);
	border-radius: var(--bttr-radius);
}


/*--------------------------------------------------------------
# Footer
--------------------------------------------------------------*/
.site-footer {
	margin-top: 4em;
	padding: 2.4em 0 2em;
	border-top: 1px solid var(--bttr-line);
	text-align: center;
	font-size: 0.85rem;
	color: var(--bttr-muted);
	letter-spacing: 0.04em;
}
.site-footer a { color: var(--bttr-muted); text-decoration: none; }
.site-footer a:hover { color: var(--bttr-text); }

.footer-widgets {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 2em;
	text-align: left;
	margin-bottom: 2em;
	padding-bottom: 2em;
	border-bottom: 1px solid var(--bttr-line);
}


/*--------------------------------------------------------------
# Media — figures, captions, galleries
--------------------------------------------------------------*/
figure {
	margin: 1.8em 0;
	text-align: center;
}
figure img { display: block; margin: 0 auto; }
figcaption,
.wp-caption-text {
	margin-top: 0.6em;
	font-size: 0.85em;
	color: var(--bttr-muted);
	font-style: italic;
	text-align: center;
}

.wp-caption { max-width: 100%; }
.wp-caption.alignleft { float: left; margin: 0.4em 1.4em 1em 0; }
.wp-caption.alignright { float: right; margin: 0.4em 0 1em 1.4em; }
.wp-caption.aligncenter { display: block; margin: 1em auto; clear: both; }

.alignleft { float: left; margin: 0.4em 1.4em 1em 0; }
.alignright { float: right; margin: 0.4em 0 1em 1.4em; }
.aligncenter { display: block; margin: 1em auto; clear: both; }
.alignnone { margin: 1em 0; }

.gallery { margin: 1.6em 0; display: flex; flex-wrap: wrap; gap: 8px; }
.gallery-item { flex: 1 1 30%; }
.gallery-item img { display: block; width: 100%; height: auto; }


/*--------------------------------------------------------------
# Forms (search, etc.)
--------------------------------------------------------------*/
.search-form {
	display: flex;
	gap: 0.5em;
	margin: 1em 0;
}
.search-form .search-field {
	flex: 1;
	padding: 0.5em 0.7em;
	border: 1px solid var(--bttr-line);
	font-family: var(--bttr-serif);
	font-size: 0.95rem;
}
.search-form .search-submit {
	background: var(--bttr-text);
	color: var(--bttr-bg);
	border: none;
	padding: 0.5em 1.2em;
	cursor: pointer;
	font-family: var(--bttr-serif);
	border-radius: var(--bttr-radius);
}


/*--------------------------------------------------------------
# Page links (paginated posts)
--------------------------------------------------------------*/
.page-links {
	margin: 2em 0;
	font-size: 0.9rem;
	letter-spacing: 0.04em;
	text-align: center;
	color: var(--bttr-muted);
}
.page-links a, .page-links > span {
	display: inline-block;
	min-width: 1.8em;
	padding: 0.3em 0.6em;
	margin: 0 0.15em;
	border: 1px solid var(--bttr-line);
	text-decoration: none;
	border-radius: var(--bttr-radius);
}
.page-links a:hover { border-color: var(--bttr-text); }


/*--------------------------------------------------------------
# Posts navigation
--------------------------------------------------------------*/
.posts-navigation, .pagination {
	margin: 3em 0;
	padding: 1.4em 0;
	border-top: 1px solid var(--bttr-line);
	border-bottom: 1px solid var(--bttr-line);
	text-align: center;
	font-size: 0.95rem;
}
.posts-navigation .nav-links { display: flex; justify-content: space-between; }
.posts-navigation a { text-decoration: none; }


/*--------------------------------------------------------------
# Accessibility
--------------------------------------------------------------*/
.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	position: absolute !important;
	height: 1px;
	width: 1px;
	overflow: hidden;
	word-wrap: normal !important;
}
.screen-reader-text:focus {
	clip: auto !important;
	display: block;
	height: auto;
	left: 5px;
	top: 5px;
	width: auto;
	z-index: 100000;
	background: var(--bttr-bg);
	border: 2px solid var(--bttr-text);
	padding: 0.4em 0.8em;
}

a:focus, button:focus, input:focus, textarea:focus, select:focus {
	outline: 2px solid var(--bttr-text);
	outline-offset: 2px;
}


/*--------------------------------------------------------------
# Clearings
--------------------------------------------------------------*/
.clear::before, .clear::after,
.entry-content::before, .entry-content::after,
.comment-content::before, .comment-content::after,
.site-header::before, .site-header::after,
.site-content::before, .site-content::after,
.site-footer::before, .site-footer::after {
	content: '';
	display: table;
}
.clear::after,
.entry-content::after,
.comment-content::after,
.site-header::after,
.site-content::after,
.site-footer::after { clear: both; }


/*--------------------------------------------------------------
# Print — print posts as a clean readable book
--------------------------------------------------------------*/
@media print {
	body { background: #fff; color: #000; font-size: 12pt; }
	#page { max-width: 100%; padding: 0; }
	.site-header, .site-footer, .main-navigation, .post-navigation,
	.comments-area, .comment-form, .widget-area, .entry-footer, .page-links { display: none; }
	.entry-content { font-size: 12pt; line-height: 1.5; }
	.entry-content a { color: #000; text-decoration: none; }
	.entry-content .pullquote, .entry-content .callout { border: 1px solid #999; }
}


/*--------------------------------------------------------------
# Responsive
--------------------------------------------------------------*/
@media (max-width: 900px) {
	:root { --bttr-page-width: 100%; }
}

@media (max-width: 700px) {
	:root { --bttr-base-size: 15px; }
	#page { padding: 0 20px; }
	.entry-title { font-size: 1.8rem; }
	.site-title { font-size: 1.7rem; }
	.site-logo img { max-height: 72px; }
	/* Scale down the hardcoded bttr.blog logo on small screens */
	.site-title a span:first-child { font-size: 64px !important; }
	.site-title a span:last-child  { font-size: 40px !important; }
	.entry-content .pullquote { font-size: 1.15em; max-width: 100%; }
	.footer-widgets { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
	.site-title a span:first-child { font-size: 52px !important; }
	.site-title a span:last-child  { font-size: 32px !important; }
}

@media (max-width: 480px) {
	:root { --bttr-base-size: 14px; --bttr-line-height: 1.7; }
	body { hyphens: none; -webkit-hyphens: none; }
	p { text-align: left; }
}
