/*
Theme Name: STOKEDLIFE
Theme URI: https://stokedlife.com
Author: Giovanni De Carlo
Author URI: https://giodc.com
Description: A very fast, minimal vertical magazine theme. Hacker News density, monochrome, no framework, no webfonts, no jQuery. Built for short attention spans and slow connections.
Version: 0.1.2
Requires at least: 6.4
Tested up to: 7.1
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: stokedlife
Tags: blog, news, one-column, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ── tokens ─────────────────────────────────────────────────────────── */
:root {
	--bg: #ffffff;
	--fg: #111111;
	--muted: #767676;
	--rule: #e6e6e6;
	--visited: #909090;
	--code-bg: #f6f6f6;
	--sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

html[data-theme="dark"] {
	--bg: #0e0e0e;
	--fg: #e9e9e9;
	--muted: #8a8a8a;
	--rule: #303030;
	--visited: #6f6f6f;
	--code-bg: #171717;
}

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

html {
	background: var(--bg);
	color: var(--fg);
	font: 14px/1.45 var(--sans);
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body { margin: 0; }

a { color: inherit; }

a:visited { color: var(--visited); }

:focus-visible {
	outline: 2px solid var(--fg);
	outline-offset: 1px;
}

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

hr {
	border: 0;
	border-top: 1px solid var(--rule);
	margin: 20px 0;
}

.wrap {
	max-width: 800px;
	margin: 0 auto;
	padding: 0 12px;
}

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ── masthead ───────────────────────────────────────────────────────── */
.masthead {
	border-bottom: 1px solid var(--rule);
	padding: 9px 0;
}

.masthead .wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 14px;
}

.brand {
	font-size: 14px;
	font-weight: 700;
	letter-spacing: -0.01em;
	text-decoration: none;
	white-space: nowrap;
}

.brand:visited { color: inherit; }

.nav {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 12px;
	font-size: 13px;
}

.nav a {
	color: var(--muted);
	text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
	color: var(--fg);
}

.nav a[aria-current="page"] { font-weight: 700; }

.masthead-tools {
	margin-left: auto;
	display: flex;
	gap: 10px;
	align-items: baseline;
	font-size: 12px;
}

.theme-toggle {
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	color: var(--muted);
	cursor: pointer;
}

.theme-toggle:hover { color: var(--fg); }

/* ── the feed: a numbered vertical list ─────────────────────────────── */
.feed {
	list-style: none;
	margin: 0;
	padding: 4px 0 0;
}

.feed > li {
	border-bottom: 1px solid var(--rule);
	padding: 4px 0;
}

.feed > li:last-child { border-bottom: 0; }

.row {
	display: flex;
	gap: 7px;
	align-items: flex-start;
}

.rank {
	flex: 0 0 20px;
	text-align: right;
	color: var(--muted);
	font: 13px/1.4 var(--mono);
	font-variant-numeric: tabular-nums;
}

/* Always present, image or not, so every title starts on the same x. */
.thumb-slot {
	flex: 0 0 32px;
	width: 32px;
	min-height: 32px;
}

.thumb-slot a { display: block; }

.thumb {
	display: block;
	width: 32px;
	height: 32px;
	object-fit: cover;
	background: var(--code-bg);
	border: 1px solid var(--rule);
}

.row-body { min-width: 0; flex: 1 1 auto; }

.title {
	font-size: 14px;
	line-height: 1.3;
	margin: 0;
	font-weight: 400;
}

.title a {
	text-decoration: none;
	color: var(--fg);
}

.title a:hover { text-decoration: underline; }

.meta-host {
	color: var(--muted);
	font-size: 12px;
	font-weight: 400;
}

.meta {
	font-size: 11px;
	color: var(--muted);
	margin-top: 2px;
	line-height: 1.4;
}

.meta a { color: var(--muted); text-decoration: none; }

.meta a:hover { text-decoration: underline; }

.meta .sep { padding: 0 5px; opacity: 0.6; }

.dept {
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-size: 10px;
}

.excerpt {
	font-size: 13px;
	color: var(--muted);
	margin: 3px 0 0;
	max-width: 62ch;
}

/* ── section heads, pagination ─────────────────────────────────────── */
.page-head {
	padding: 16px 0 4px;
	border-bottom: 1px solid var(--rule);
}

.page-head h1 {
	font-size: 15px;
	margin: 0 0 3px;
	letter-spacing: -0.01em;
}

.page-head p {
	margin: 0 0 8px;
	font-size: 12px;
	color: var(--muted);
}

.pager {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	font-size: 12px;
	padding: 12px 0 32px;
	border-top: 1px solid var(--rule);
	margin-top: 8px;
}

.pager a { color: var(--muted); text-decoration: none; }
.pager a:hover { color: var(--fg); text-decoration: underline; }

/* ── single ─────────────────────────────────────────────────────────── */
.article {
	max-width: 680px;
	padding: 18px 0 8px;
}

.article h1 {
	font-size: 23px;
	line-height: 1.22;
	letter-spacing: -0.015em;
	margin: 0 0 6px;
}

.article .meta { font-size: 12px; margin-bottom: 18px; }

.byline { font-weight: 700; }

.entry {
	font-size: 17px;
	line-height: 1.6;
}

.entry > * + * { margin-top: 1.1em; }

.entry h2, .entry h3, .entry h4 {
	line-height: 1.25;
	margin: 1.6em 0 0.4em;
	letter-spacing: -0.01em;
}

.entry h2 { font-size: 20px; }
.entry h3 { font-size: 17px; }

.entry a { text-decoration: underline; text-underline-offset: 2px; }

.entry ul, .entry ol { padding-left: 22px; }

.entry li + li { margin-top: 0.35em; }

.entry blockquote {
	margin: 1.2em 0;
	padding: 2px 0 2px 16px;
	border-left: 2px solid var(--rule);
	color: var(--muted);
}

.entry pre {
	background: var(--code-bg);
	border: 1px solid var(--rule);
	padding: 10px 12px;
	overflow-x: auto;
	font: 12px/1.5 var(--mono);
	border-radius: 0;
}

.entry code {
	font: 0.9em/1.5 var(--mono);
	background: var(--code-bg);
	padding: 1px 4px;
}

.entry pre code { background: none; padding: 0; font-size: 12px; }

.entry figure { margin: 1.4em 0; }

.entry figcaption {
	font-size: 11px;
	color: var(--muted);
	margin-top: 5px;
}

.entry table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.entry th, .entry td {
	border: 1px solid var(--rule);
	padding: 5px 8px;
	text-align: left;
}

.entry img { border: 1px solid var(--rule); }

.taglist {
	font-size: 11px;
	color: var(--muted);
	margin-top: 26px;
	padding-top: 12px;
	border-top: 1px solid var(--rule);
}

.taglist a { color: var(--muted); text-decoration: none; margin-right: 10px; }
.taglist a:hover { color: var(--fg); text-decoration: underline; }

/* ── comments: flat and dense, HN-style ────────────────────────────── */
.comments {
	max-width: 680px;
	margin-top: 34px;
	padding-top: 14px;
	border-top: 1px solid var(--rule);
}

.comments h2 {
	font-size: 13px;
	margin: 0 0 10px;
	letter-spacing: -0.01em;
}

.comment-list, .comment-list .children {
	list-style: none;
	margin: 0;
	padding: 0;
}

.comment-list .children {
	padding-left: 15px;
	border-left: 1px solid var(--rule);
	margin-top: 9px;
}

.comment-list > li { margin-bottom: 13px; }

.c-meta {
	font-size: 11px;
	color: var(--muted);
	margin-bottom: 2px;
}

.c-author { font-weight: 700; color: var(--fg); }

.c-author a { text-decoration: none; color: inherit; }

.c-meta a { color: var(--muted); text-decoration: none; }
.c-meta a:hover { text-decoration: underline; }

.c-body { font-size: 14px; line-height: 1.55; }

.c-body > * + * { margin-top: 0.7em; }

.c-body pre { font-size: 12px; overflow-x: auto; }

.comment-respond {
	margin-top: 26px;
	padding-top: 14px;
	border-top: 1px solid var(--rule);
	font-size: 13px;
}

.comment-respond h2 { font-size: 13px; margin: 0 0 10px; }

.comment-form p { margin: 0 0 9px; }

.comment-form label {
	display: block;
	font-size: 11px;
	color: var(--muted);
	margin-bottom: 2px;
}

input[type="text"], input[type="email"], input[type="url"], input[type="search"], textarea {
	width: 100%;
	max-width: 420px;
	background: var(--bg);
	color: var(--fg);
	border: 1px solid var(--rule);
	padding: 6px 8px;
	font: 14px/1.4 var(--sans);
	border-radius: 0;
}

textarea { max-width: 100%; min-height: 110px; }

button, input[type="submit"] {
	background: var(--fg);
	color: var(--bg);
	border: 0;
	padding: 6px 13px;
	font: 700 13px/1.4 var(--sans);
	cursor: pointer;
	border-radius: 0;
}

/* ── search ────────────────────────────────────────────────────────── */
.searchform { display: flex; gap: 7px; max-width: 420px; margin: 14px 0; }
.searchform input[type="search"] { flex: 1 1 auto; }

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ── foot ──────────────────────────────────────────────────────────── */
.foot {
	border-top: 1px solid var(--rule);
	margin-top: 30px;
	padding: 14px 0 34px;
	font-size: 11px;
	color: var(--muted);
}

.foot .wrap { display: flex; flex-wrap: wrap; gap: 6px 14px; }

.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--fg); text-decoration: underline; }

/* ── WP core blocks, kept deliberately plain ───────────────────────── */
.alignwide, .alignfull { margin-left: 0; margin-right: 0; }
.wp-block-quote { border-left: 2px solid var(--rule); padding-left: 16px; }
.wp-block-image { margin: 0; }
.wp-block-separator { border-top: 1px solid var(--rule); }

@media (max-width: 480px) {
	html { font-size: 13.5px; }
	.rank { flex-basis: 18px; font-size: 12px; }
	.thumb-slot { flex-basis: 28px; width: 28px; }
	.thumb { width: 28px; height: 28px; }
	.entry { font-size: 16px; }
	.article h1 { font-size: 20px; }
}

@media print {
	.masthead-tools, .pager, .comments, .foot { display: none; }
	html { font-size: 11pt; }
}
/* Hero on a single story. The one place the theme shows a large image, and even
   here it is capped at 720px — the article column stays the narrowest thing on
   the page. */
.hero { margin: 0 0 20px; }
.hero img {
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid var(--rule);
}
.hero figcaption {
	margin-top: 6px;
	color: var(--muted);
	font-size: 11px;
	line-height: 1.4;
}
.hero figcaption a { color: var(--muted); }
