/*
Theme Name: Boatkinds Chartroom
Theme URI: https://boatkinds.com/
Author: Boatkinds
Description: A chart-room editorial theme for Boatkinds — sailcloth paper, deep-water ink, signal-orange accents and a randomly rotating Popular Topics deck on every page.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
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: boatkinds-chartroom
Tags: blog, news, two-columns, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, widgets
*/

/* ==========================================================================
   Fonts (bundled, latin)
   ========================================================================== */
@font-face { font-family: "Libre Bodoni"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("assets/fonts/libre-bodoni.woff2") format("woff2"); }
@font-face { font-family: "Libre Bodoni"; font-style: italic; font-weight: 400 700; font-display: swap; src: url("assets/fonts/libre-bodoni-italic.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 300 800; font-display: swap; src: url("assets/fonts/public-sans.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url("assets/fonts/public-sans-italic.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("assets/fonts/jetbrains-mono.woff2") format("woff2"); }

/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
	--ink: #0F2733;
	--ink-2: #1B3B4B;
	--ink-3: #2C5163;
	--paper: #F3EEE3;
	--paper-2: #EAE3D3;
	--card: #FBF8F1;
	--line: #D5CBB6;
	--line-strong: #B9AC91;
	--muted: #5A6670;
	--signal: #E2531F;
	--signal-text: #B23E12;
	--sea: #2F7F78;
	--sea-light: #5BB6AE;
	--brass: #C9A257;

	--font-display: "Libre Bodoni", "Bodoni 72", Didot, Georgia, serif;
	--font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

	--wrap: 1240px;
	--gutter: clamp(16px, 4vw, 40px);
	--radius: 4px;
	--ease: cubic-bezier(.2, .7, .2, 1);
	--shadow: 0 1px 0 rgba(15, 39, 51, .06), 0 10px 30px -18px rgba(15, 39, 51, .45);
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
img, svg, video, iframe { max-width: 100%; height: auto; }
img { display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--signal-text); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -.01em; margin: 0 0 .5em; text-wrap: balance; }
p { margin: 0 0 1.2em; }
.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px;
	overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important;
}
.skip-link:focus {
	clip: auto; clip-path: none; height: auto; width: auto; margin: 0; z-index: 1000;
	top: 8px; left: 8px; padding: 10px 16px; background: var(--ink); color: var(--paper);
	font-weight: 600; text-decoration: none;
}
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.mono, .kicker {
	font-family: var(--font-mono);
	font-size: 12px;
	letter-spacing: .12em;
	text-transform: uppercase;
}
.kicker { color: var(--signal-text); font-weight: 600; }

/* ==========================================================================
   Signal-flag strip + Masthead
   ========================================================================== */
.flagline {
	height: 6px;
	background:
		linear-gradient(90deg,
			var(--ink) 0 12.5%, var(--signal) 12.5% 25%, var(--paper-2) 25% 37.5%, var(--sea) 37.5% 50%,
			var(--brass) 50% 62.5%, var(--ink-3) 62.5% 75%, var(--signal) 75% 87.5%, var(--sea-light) 87.5% 100%);
	background-size: 320px 6px;
}
.masthead {
	position: sticky; top: 0; z-index: 50;
	background: rgba(243, 238, 227, .94);
	-webkit-backdrop-filter: saturate(1.4) blur(10px);
	backdrop-filter: saturate(1.4) blur(10px);
	border-bottom: 1px solid var(--line);
}
.admin-bar .masthead { top: 32px; }
@media (max-width: 782px) { .admin-bar .masthead { top: 0; position: relative; } }
.masthead__inner {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 24px;
	min-height: 76px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand__mark { width: 44px; height: 44px; flex: none; transition: transform .6s var(--ease); }
.brand:hover .brand__mark { transform: rotate(-8deg); }
.brand__word { font-family: var(--font-display); font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.brand__word em { font-style: italic; font-weight: 600; color: var(--signal); }
.brand img.custom-logo { max-height: 48px; width: auto; }
.masthead__bearing {
	justify-self: center;
	display: flex; align-items: center; gap: 14px;
	color: var(--muted);
	white-space: nowrap; overflow: hidden;
}
.masthead__bearing .tick { width: 28px; height: 1px; background: var(--line-strong); }
.masthead__actions { display: flex; align-items: center; gap: 6px; }
.navlink {
	display: inline-flex; align-items: center; gap: 8px;
	min-height: 44px; padding: 0 14px;
	font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
	text-decoration: none; color: var(--ink);
	border-radius: 999px;
	transition: background .2s var(--ease), color .2s var(--ease);
}
.navlink:hover { background: var(--paper-2); color: var(--ink); }
.navlink--signal { background: var(--ink); color: var(--paper); }
.navlink--signal:hover { background: var(--signal); color: #fff; }
.iconbtn {
	display: inline-grid; place-items: center;
	width: 44px; height: 44px; border-radius: 999px;
	border: 1px solid var(--line); background: transparent; color: var(--ink);
	cursor: pointer; transition: border-color .2s var(--ease), background .2s var(--ease);
}
.iconbtn:hover { border-color: var(--ink); background: var(--card); }
.iconbtn svg { width: 18px; height: 18px; }

.searchbar { display: none; border-top: 1px solid var(--line); background: var(--card); }
.searchbar.is-open { display: block; animation: drop .25s var(--ease); }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.searchbar .wrap { padding-top: 18px; padding-bottom: 18px; }

.search-form { display: flex; gap: 10px; align-items: stretch; }
.search-form label { flex: 1; }
.search-field {
	width: 100%; min-height: 50px; padding: 0 18px;
	font: 400 18px/1 var(--font-body); color: var(--ink);
	background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--radius);
}
.search-field:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(226, 83, 31, .25); }
.search-submit, .button, button.submit, input[type="submit"] {
	min-height: 50px; padding: 0 22px; cursor: pointer;
	font: 600 13px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase;
	color: #fff; background: var(--ink); border: 0; border-radius: var(--radius);
	transition: background .2s var(--ease);
}
.search-submit:hover, .button:hover, input[type="submit"]:hover { background: var(--signal-text); }

/* Header widget output (analytics / ads) — never takes layout space unless it renders something visible */
.bk-header-codes { display: contents; }

/* Reading waterline */
.waterline { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100; pointer-events: none; }
.waterline span { display: block; height: 100%; width: 100%; background: var(--signal); transform-origin: 0 50%; transform: scaleX(0); }

/* ==========================================================================
   Chart grid helpers
   ========================================================================== */
.chartgrid {
	background-image:
		linear-gradient(rgba(15, 39, 51, .055) 1px, transparent 1px),
		linear-gradient(90deg, rgba(15, 39, 51, .055) 1px, transparent 1px);
	background-size: 48px 48px;
}
.section-head {
	display: flex; align-items: end; justify-content: space-between; gap: 20px;
	margin: 0 0 28px; padding-bottom: 14px; border-bottom: 2px solid var(--ink);
}
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); margin: 0; }
.section-head h2 em { color: var(--signal); }
.section-head .mono { color: var(--muted); }

/* ==========================================================================
   Home — lead story ("The Bridge")
   ========================================================================== */
.bridge { padding: clamp(28px, 5vw, 56px) 0 clamp(36px, 5vw, 64px); border-bottom: 1px solid var(--line); }
.bridge__grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(24px, 3.5vw, 48px); }
.lead { position: relative; }
.lead__media {
	position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden;
	border-radius: var(--radius); background: var(--ink);
	clip-path: polygon(0 0, 100% 0, 100% calc(100% - 28px), calc(100% - 28px) 100%, 0 100%);
}
.lead__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.lead:hover .lead__media img { transform: scale(1.035); }
.lead__plate {
	position: absolute; left: 16px; top: 16px;
	padding: 6px 10px; background: var(--paper); color: var(--ink);
	font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; font-weight: 600;
}
.lead__body { padding-top: 22px; max-width: 760px; }
.lead__title { font-size: clamp(32px, 4.6vw, 58px); line-height: 1.02; margin: 10px 0 14px; }
.lead__title a { text-decoration: none; background: linear-gradient(var(--signal), var(--signal)) 0 100% / 0 3px no-repeat; transition: background-size .5s var(--ease); }
.lead__title a:hover { color: var(--ink); background-size: 100% 3px; }
.lead__excerpt { font-size: 19px; color: var(--ink-2); max-width: 62ch; }
.deck { display: flex; flex-direction: column; border-top: 2px solid var(--ink); }
.deck__label { padding: 10px 0; color: var(--muted); border-bottom: 1px solid var(--line); }
.deckitem { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.deckitem__media { display: block; aspect-ratio: 1; overflow: hidden; border-radius: var(--radius); background: var(--ink); }
.deckitem__media img { width: 100%; height: 100%; object-fit: cover; }
.deckitem h3 { font-size: 20px; margin: 6px 0 0; }
.deckitem h3 a { text-decoration: none; }
.deckitem:hover h3 a { color: var(--signal-text); }

/* ==========================================================================
   Logbook (latest list)
   ========================================================================== */
.logbook { padding: clamp(40px, 6vw, 72px) 0; }
.logrow {
	display: grid; grid-template-columns: 84px minmax(0, 1fr) 260px; gap: clamp(16px, 3vw, 36px);
	align-items: start; padding: 26px 0; border-bottom: 1px solid var(--line);
	position: relative;
}
.logrow::before {
	content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; width: 0;
	background: var(--signal); transition: width .6s var(--ease);
}
.logrow:hover::before { width: 100%; }
.logrow__no { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--muted); padding-top: 8px; letter-spacing: .08em; }
.logrow__no b { display: block; font-family: var(--font-display); font-size: 40px; line-height: 1; color: var(--ink); letter-spacing: 0; font-weight: 500; }
.logrow__title { font-size: clamp(22px, 2.4vw, 30px); margin: 6px 0 10px; }
.logrow__title a { text-decoration: none; }
.logrow:hover .logrow__title a { color: var(--signal-text); }
.logrow__excerpt { color: var(--ink-2); margin: 0 0 12px; max-width: 68ch; }
.logrow__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: var(--ink); }
.logrow__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.logrow:hover .logrow__media img { transform: scale(1.04); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--muted); }
.meta > * + *::before { content: "/"; margin-right: 14px; color: var(--line-strong); }
.meta a { text-decoration: none; color: var(--signal-text); }

/* placeholder art for posts without an image */
.noimg {
	width: 100%; height: 100%; display: grid; place-items: center; color: var(--paper);
	background:
		radial-gradient(circle at 30% 120%, rgba(91, 182, 174, .45), transparent 55%),
		repeating-linear-gradient(170deg, transparent 0 14px, rgba(243, 238, 227, .07) 14px 15px),
		var(--ink-2);
}
.noimg svg { width: 42%; max-width: 90px; opacity: .85; }

/* ==========================================================================
   Pagination
   ========================================================================== */
.pager { margin-top: 40px; }
.pager .nav-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pager .page-numbers {
	display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px;
	font-family: var(--font-mono); font-size: 13px; font-weight: 600; text-decoration: none;
	border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
}
.pager .page-numbers.current { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pager a.page-numbers:hover { border-color: var(--ink); color: var(--ink); }
.pager .dots { border: 0; background: none; }

/* ==========================================================================
   Popular Topics ("The Signal Deck")
   ========================================================================== */
.popular {
	position: relative;
	padding: clamp(48px, 7vw, 88px) 0;
	background: var(--ink);
	color: var(--paper);
	overflow: hidden;
}
.popular::before {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background-image:
		linear-gradient(rgba(243, 238, 227, .06) 1px, transparent 1px),
		linear-gradient(90deg, rgba(243, 238, 227, .06) 1px, transparent 1px);
	background-size: 56px 56px;
	-webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
	mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}
.popular .wrap { position: relative; }
.popular__head {
	display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px;
	margin-bottom: 36px;
}
.popular__rose { width: 64px; height: 64px; color: var(--brass); animation: drift 40s linear infinite; }
@keyframes drift { to { transform: rotate(360deg); } }
.popular__head h2 { font-size: clamp(32px, 4.4vw, 54px); margin: 0; color: var(--paper); }
.popular__head h2 em { color: var(--signal); font-weight: 500; }
.popular__head p { margin: 4px 0 0; color: rgba(243, 238, 227, .7); }
.popular__count { color: var(--brass); text-align: right; }

.popgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; counter-reset: pop; }
.popcard {
	counter-increment: pop;
	position: relative; display: flex; flex-direction: column;
	background: var(--card); color: var(--ink);
	border-radius: var(--radius); overflow: hidden;
	box-shadow: var(--shadow);
	clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
	transition: transform .35s var(--ease);
}
.popcard:hover { transform: translateY(-4px); }
.popcard__media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--ink-2); }
.popcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.popcard:hover .popcard__media img { transform: scale(1.06); }
.popcard__no {
	position: absolute; left: 12px; bottom: -1px; z-index: 1;
	padding: 4px 10px 2px; background: var(--card);
	font-family: var(--font-display); font-style: italic; font-size: 26px; line-height: 1; color: var(--signal);
}
.popcard__no::before { content: counter(pop, decimal-leading-zero); }
.popcard__body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 16px 18px 22px; }
.popcard__title { font-size: 19px; line-height: 1.2; margin: 0; }
.popcard__title a { text-decoration: none; }
.popcard__title a::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.popcard:hover .popcard__title a { color: var(--signal-text); }
.popcard__meta { margin-top: auto; color: var(--muted); }
.popular--inline { margin-top: clamp(48px, 6vw, 72px); }

/* ==========================================================================
   Single post
   ========================================================================== */
.post-hero { padding: clamp(32px, 5vw, 64px) 0 28px; }
.post-hero__inner { max-width: 940px; }
.post-hero h1 { font-size: clamp(36px, 5.6vw, 72px); line-height: 1; margin: 14px 0 20px; }
.post-hero__deck { font-size: clamp(18px, 1.8vw, 22px); color: var(--ink-2); max-width: 60ch; margin: 0 0 22px; }
.post-hero .meta { padding-top: 16px; border-top: 1px solid var(--line); }
.post-figure { margin: 0 0 clamp(32px, 4vw, 52px); }
.post-figure__frame {
	overflow: hidden; border-radius: var(--radius); background: var(--ink);
	clip-path: polygon(0 0, 100% 0, 100% calc(100% - 34px), calc(100% - 34px) 100%, 0 100%);
}
.post-figure__frame img { width: 100%; max-height: 72vh; object-fit: cover; }
.post-figure figcaption { margin-top: 10px; color: var(--muted); }

.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(32px, 5vw, 72px); align-items: start; }
.post-layout--full { grid-template-columns: minmax(0, 1fr); }
.entry { max-width: 720px; font-size: 19px; line-height: 1.72; }
.entry > *:first-child { margin-top: 0; }
.entry h2 { font-size: clamp(28px, 3vw, 36px); margin: 1.8em 0 .6em; }
.entry h3 { font-size: clamp(22px, 2.4vw, 27px); margin: 1.6em 0 .5em; }
.entry h4 { font-family: var(--font-body); font-size: 19px; font-weight: 700; margin: 1.6em 0 .4em; }
.entry a { color: var(--signal-text); text-decoration-thickness: 1px; }
.entry a:hover { text-decoration-thickness: 2px; }
.entry ul, .entry ol { padding-left: 1.3em; margin: 0 0 1.3em; }
.entry li { margin-bottom: .45em; }
.entry ul li::marker { color: var(--signal); }
.entry img { border-radius: var(--radius); }
.entry figure { margin: 2em 0; }
.entry figcaption, .wp-caption-text { font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; color: var(--muted); margin-top: 8px; }
.entry .single-intro::first-letter,
.entry > p:first-of-type::first-letter {
	float: left; font-family: var(--font-display); font-weight: 700; font-size: 4.4em; line-height: .82;
	margin: .06em .1em 0 0; color: var(--signal);
}
.entry blockquote, .wp-block-quote {
	margin: 2em 0; padding: 4px 0 4px 26px; border-left: 4px solid var(--signal);
	font-family: var(--font-display); font-size: 1.3em; line-height: 1.4; font-style: italic;
}
.entry blockquote cite { display: block; margin-top: 10px; font-family: var(--font-mono); font-style: normal; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.entry table { width: 100%; border-collapse: collapse; font-size: 16px; margin: 2em 0; }
.entry th, .entry td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.entry th { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; background: var(--paper-2); }
.entry hr { border: 0; height: 12px; margin: 2.4em 0; background: radial-gradient(circle, var(--line-strong) 1.5px, transparent 2px) 0 50% / 14px 12px repeat-x; }
.entry pre { overflow: auto; padding: 18px; background: var(--ink); color: var(--paper); border-radius: var(--radius); font: 14px/1.6 var(--font-mono); }
.entry code { font-family: var(--font-mono); font-size: .86em; background: var(--paper-2); padding: 2px 5px; border-radius: 3px; }
.entry pre code { background: none; padding: 0; }
.entry iframe { width: 100%; }
.alignleft { float: left; margin: .3em 1.5em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.5em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.alignwide, .alignfull { width: 100%; }

.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 36px 0 0; padding-top: 22px; border-top: 1px solid var(--line); max-width: 720px; }
.post-tags a {
	display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px;
	font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-decoration: none;
	border: 1px solid var(--line-strong); border-radius: 999px;
}
.post-tags a:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.postnav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 40px; max-width: 720px; }
.postnav a {
	display: block; padding: 18px 20px; text-decoration: none; background: var(--card);
	border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .2s var(--ease);
}
.postnav a:hover { border-color: var(--ink); color: var(--ink); }
.postnav .mono { color: var(--muted); display: block; margin-bottom: 6px; }
.postnav strong { font-family: var(--font-display); font-size: 19px; font-weight: 600; line-height: 1.25; display: block; }
.postnav__next { text-align: right; }

/* Right rail */
.rail { position: sticky; top: 104px; display: flex; flex-direction: column; gap: 28px; }
.railbox { border-top: 2px solid var(--ink); padding-top: 14px; }
.railbox__title { color: var(--muted); margin: 0 0 12px; }
.raillist { list-style: none; margin: 0; padding: 0; counter-reset: rl; }
.raillist li { counter-increment: rl; display: grid; grid-template-columns: 30px 1fr; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.raillist li::before { content: counter(rl, decimal-leading-zero); font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--signal-text); padding-top: 3px; }
.raillist a { font-family: var(--font-display); font-size: 17px; font-weight: 600; line-height: 1.25; text-decoration: none; }
.widget { font-size: 15px; }
.widget + .widget { margin-top: 24px; }
.widget-title { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* ==========================================================================
   Comments
   ========================================================================== */
.comments { max-width: 720px; margin-top: 56px; padding-top: 28px; border-top: 2px solid var(--ink); }
.comments__title { font-size: 28px; }
.comment-list { list-style: none; margin: 0 0 32px; padding: 0; }
.comment-list .children { list-style: none; margin: 0; padding-left: clamp(16px, 4vw, 40px); border-left: 1px dashed var(--line-strong); }
.comment-card { padding: 18px 0; border-bottom: 1px solid var(--line); }
.comment-card__head { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; margin-bottom: 8px; }
.comment-card__author { font-weight: 700; }
.comment-card__head a { color: var(--muted); text-decoration: none; }
.comment-reply-link { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--signal-text); text-decoration: none; }
.comment-form label { display: block; font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 6px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: 12px 14px; font: 16px/1.5 var(--font-body); color: var(--ink);
	background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--radius);
}
.comment-form p { margin-bottom: 16px; }
.comment-form .comment-form-cookies-consent label { display: inline; text-transform: none; letter-spacing: 0; font-family: var(--font-body); font-size: 14px; }

/* ==========================================================================
   Archive / search / 404 headers
   ========================================================================== */
.pagehead { padding: clamp(36px, 6vw, 72px) 0 clamp(20px, 3vw, 32px); border-bottom: 1px solid var(--line); }
.pagehead h1 { font-size: clamp(36px, 5.4vw, 68px); margin: 10px 0 12px; }
.pagehead p { color: var(--ink-2); max-width: 60ch; margin: 0; }
.pagehead .search-form { max-width: 640px; margin-top: 24px; }
.notfound { padding: clamp(56px, 9vw, 120px) 0; }
.notfound__code { font-family: var(--font-display); font-size: clamp(96px, 18vw, 220px); line-height: .9; color: var(--signal); font-style: italic; }

/* ==========================================================================
   Footer
   ========================================================================== */
.harbor { margin-top: 0; background: #0A1D26; color: rgba(243, 238, 227, .78); }
.harbor__wave { display: block; width: 100%; height: 40px; color: var(--paper); background: #0A1D26; }
.harbor__top { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; padding: 48px 0 40px; border-bottom: 1px solid rgba(243, 238, 227, .12); }
.harbor .brand { color: var(--paper); }
.harbor .brand__word { font-size: 40px; }
.harbor__about { margin: 16px 0 0; max-width: 46ch; }
.harbor__nav ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 24px; }
.harbor__nav a { display: inline-flex; align-items: center; min-height: 40px; color: var(--paper); text-decoration: none; font-size: 15px; }
.harbor__nav a:hover { color: var(--signal); }
.harbor__nav .mono { color: var(--brass); margin: 0 0 10px; }
.harbor__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 22px 0 30px; }
.harbor__bottom .navlink { color: var(--paper); }
.harbor__bottom .navlink:hover { background: rgba(243, 238, 227, .08); color: var(--paper); }

/* ==========================================================================
   Motion
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
	.reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
	.post-layout { grid-template-columns: minmax(0, 1fr); }
	.rail { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
	.masthead__bearing { display: none; }
	.masthead__inner { grid-template-columns: auto 1fr; }
	.masthead__actions { justify-self: end; }
}
@media (max-width: 960px) {
	.bridge__grid { grid-template-columns: minmax(0, 1fr); }
	.popgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.logrow { grid-template-columns: 56px minmax(0, 1fr); }
	.logrow__media { grid-column: 2; grid-row: 1; }
	.logrow__no b { font-size: 30px; }
	.harbor__top { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
	body { font-size: 16px; }
	.brand__word { font-size: 24px; }
	.brand__mark { width: 38px; height: 38px; }
	.masthead__inner { min-height: 64px; gap: 10px; }
	.navlink--hide-sm { display: none; }
	.popgrid { grid-template-columns: minmax(0, 1fr); }
	.popcard { display: grid; grid-template-columns: 120px minmax(0, 1fr); clip-path: none; }
	.popcard__media { aspect-ratio: auto; height: 100%; min-height: 110px; }
	.popcard__no { font-size: 20px; left: 8px; }
	.popcard__body { padding: 14px; }
	.popcard__title { font-size: 17px; }
	.popular__head { grid-template-columns: auto 1fr; }
	.popular__count { display: none; }
	.popular__rose { width: 48px; height: 48px; }
	.deckitem { grid-template-columns: 84px 1fr; }
	.logrow { grid-template-columns: minmax(0, 1fr); }
	.logrow__no { display: none; }
	.logrow__media { grid-column: 1; }
	.entry { font-size: 18px; }
	.rail { grid-template-columns: minmax(0, 1fr); }
	.postnav { grid-template-columns: minmax(0, 1fr); }
	.postnav__next { text-align: left; }
	.harbor__nav ul { grid-template-columns: minmax(0, 1fr); }
	.search-form { flex-direction: column; }
}
