:root {
	--paper: #f3f4f8;
	--card: #ffffff;
	--ink: #0e1133;
	--ink-soft: #6d6e75;
	--line: #e3e6ee;
	--clay: #0018a8;
	--clay-deep: #001270;
	--clay-soft: #e7ebf8;
	--moss: #0f5c56;
	--moss-soft: #e5f6f3;
	--gold-soft: #fff4d6;
	--danger: #c4232b;
	--danger-soft: #fdecea;
	--danger-line: #f3c7c4;
	--footer: #0018a8;
	--footer-text: #c9d4f0;
	--shadow: 0 18px 40px rgba(14, 17, 51, 0.08);
	--shadow-sm: 0 10px 24px rgba(14, 17, 51, 0.05);
	--sans: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--radius: 18px;
}

body.nook-body:not(.nook-embedded) {
	margin: 0;
	background: var(--paper);
}

.nook-shell {
	color: var(--ink);
	font-family: var(--sans);
	font-size: 17px;
	line-height: 1.5;
	background:
		radial-gradient(1100px 480px at 0% -10%, rgba(0, 24, 168, 0.08), transparent 55%),
		radial-gradient(900px 420px at 100% 0%, rgba(35, 195, 170, 0.12), transparent 50%),
		var(--paper);
}

body.nook-body:not(.nook-embedded) .nook-shell {
	min-height: 100vh;
}

body.nook-embedded .nook-shell {
	background: var(--paper);
}

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

.skip,
body.nook-body .ea11y-skip-to-content-link,
body.nook-body a.skip-link {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.skip:focus,
body.nook-body .ea11y-skip-to-content-link:focus,
body.nook-body a.skip-link:focus {
	position: fixed !important;
	left: 12px !important;
	top: 12px !important;
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	padding: 8px 12px !important;
	overflow: visible !important;
	clip: auto !important;
	clip-path: none !important;
	white-space: normal !important;
	background: var(--ink) !important;
	color: #fff !important;
	z-index: 100000 !important;
	text-decoration: none !important;
}

body.nook-body nav[aria-label="Skip to content navigation"] {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	padding: 0;
	overflow: visible;
}

body.nook-body .ea11y-skip-to-content-backdrop {
	display: none !important;
}

.wrap {
	width: min(1120px, calc(100% - 32px));
	margin: 0 auto;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

.hp {
	position: absolute;
	left: -9999px;
	height: 0;
	overflow: hidden;
}

.nook-shell h1,
.nook-shell h2,
.nook-shell .thread-title,
.nook-shell .stage-title,
.nook-shell .topic-name,
.nook-shell .person-card-name {
	font-family: var(--sans);
	font-weight: 600;
	letter-spacing: -0.03em;
}

.nook-shell h1 {
	font-size: clamp(2.2rem, 5vw, 3.6rem);
	line-height: 1.12;
	margin: 0 0 12px;
}

.nook-shell h2 {
	font-size: 1.7rem;
	margin: 0;
}

.nook-shell .wrap a {
	color: var(--ink);
}

.nook-shell .wrap a:hover {
	color: var(--clay);
}

.topbar {
	position: sticky;
	top: 0;
	z-index: 30;
	background: #fff;
	border-bottom: 0;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

body.nook-embedded .topbar {
	position: relative;
	top: auto;
	box-shadow: none;
	border-bottom: 1px solid var(--line);
}

body.admin-bar .topbar {
	top: 32px;
}

.topbar-inner {
	display: flex;
	align-items: center;
	gap: 16px;
	min-height: 74px;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	color: var(--ink);
	font-size: 1.4rem;
}

.mark {
	width: 28px;
	height: 28px;
	color: var(--clay);
}

.nook-nav {
	display: flex;
	gap: 4px;
}

.nook-nav a {
	text-decoration: none;
	color: var(--ink-soft);
	font-weight: 600;
	padding: 8px 12px;
	border-radius: 999px;
}

.nook-nav a[aria-current="page"] {
	background: var(--clay-soft);
	color: var(--clay);
	box-shadow: none;
}

.top-search {
	margin-left: auto;
}

.top-search input,
.hero-search input,
.field input,
.field textarea,
.field select {
	font: inherit;
	color: inherit;
	background: white;
	border: 1px solid var(--line);
	border-radius: 14px;
	padding: 12px 14px;
	width: 100%;
}

.top-search input {
	width: 180px;
	border-radius: 999px;
	padding: 9px 14px;
	background: rgba(255, 255, 255, 0.7);
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.top-search input:focus,
.hero-search input:focus {
	outline: 2px solid var(--clay);
	border-color: transparent;
}

.account {
	display: flex;
	align-items: center;
	gap: 10px;
}

.account-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	font-weight: 600;
}

.nav-toggle {
	display: none;
	width: 42px;
	height: 42px;
	border-radius: 12px;
	border: 1px solid var(--line);
	background: var(--card);
	padding: 0;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
}

.nav-toggle span:not(.sr-only) {
	display: block;
	width: 16px;
	height: 2px;
	background: var(--ink);
	border-radius: 2px;
}

.nook-shell .button,
.nook-shell a.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border: 1px solid transparent;
	background: var(--clay);
	color: white;
	text-decoration: none;
	border-radius: 999px;
	padding: 12px 18px;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	box-shadow: none;
}

.nook-shell .button:hover,
.nook-shell a.button:hover {
	background: var(--clay-deep);
	color: white;
}

.nook-shell .button-small {
	padding: 8px 14px;
	font-size: 0.95rem;
}

.nook-shell .button-ghost,
.nook-shell a.button-ghost {
	background: transparent;
	color: var(--ink);
	border-color: var(--line);
}

.nook-shell .button-ghost:hover,
.nook-shell a.button-ghost:hover {
	background: white;
	color: var(--clay);
	border-color: var(--clay);
}

.nook-shell .button-danger,
.nook-shell a.button-danger {
	background: transparent;
	color: var(--danger);
	border-color: var(--danger-line);
}

.nook-shell .button-danger:hover,
.nook-shell a.button-danger:hover {
	background: var(--danger-soft);
	color: var(--danger);
}

.home-row {
	padding: 28px 0 0;
}

.nook-shell a.home-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #fff;
	color: var(--clay);
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 8px 16px 8px 12px;
	font-weight: 600;
	font-size: 0.95rem;
	line-height: 1.2;
	text-decoration: none;
	box-shadow: var(--shadow-sm);
}

.home-link svg {
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
}

.nook-shell a.home-link:hover {
	background: var(--clay);
	border-color: var(--clay);
	color: #fff;
}

.nook-shell .home-link:focus-visible {
	outline: 2px solid var(--clay);
	outline-offset: 3px;
}

.hero {
	display: grid;
	grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.8fr);
	gap: 36px;
	align-items: center;
	padding: 18px 0 18px;
}

.eyebrow,
.kicker {
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--clay-deep);
	margin: 0 0 8px;
}

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

.lede {
	font-size: 1.12rem;
	color: var(--ink-soft);
	max-width: 46rem;
	margin: 0 0 18px;
}

.hero-actions,
.form-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.hero-actions .text-link {
	font-weight: 600;
	color: var(--clay);
	text-decoration: none;
}

.hero-actions .text-link:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.hero-search {
	display: flex;
	gap: 8px;
	flex: 1 1 280px;
}

.hero-search input {
	border-radius: 999px;
	min-width: 0;
}

.stats {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	color: var(--ink-soft);
	margin: 18px 0 0;
}

.stats strong {
	color: var(--ink);
}

.hero-stage {
	position: relative;
	min-height: 360px;
}

.stage-card {
	position: absolute;
	display: block;
	width: min(100%, 320px);
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 20px;
	padding: 18px;
	box-shadow: var(--shadow);
	text-decoration: none;
	color: inherit;
}

.stage-card:first-of-type {
	top: 0;
	left: 0;
	z-index: 1;
	width: min(92%, 300px);
	transform: rotate(-2.5deg);
}

.stage-card:last-of-type {
	top: 158px;
	right: 0;
	z-index: 2;
	width: min(92%, 300px);
	transform: rotate(2deg);
}

.stage-card:first-of-type:last-of-type {
	top: 28px;
	left: 12px;
	right: auto;
	transform: rotate(-1.5deg);
}

.stage-title {
	display: block;
	font-size: 1.45rem;
	line-height: 1.15;
	margin: 6px 0;
}

.stage-by {
	color: var(--ink-soft);
	font-size: 0.92rem;
}

.section-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	margin: 28px 0 14px;
}

.section-head a {
	font-weight: 600;
}

.topic-row {
	list-style: none;
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(210px, 1fr);
	gap: 12px;
	overflow-x: auto;
	padding: 4px 2px 12px;
	margin: 0;
	scroll-snap-type: x mandatory;
}

.topic-card {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-height: 150px;
	padding: 16px;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 18px;
	text-decoration: none;
	box-shadow: var(--shadow-sm);
	scroll-snap-align: start;
}

.topic-card:hover {
	transform: translateY(-2px);
}

.topic-top,
.kicker,
.who,
.stats,
.post-person,
.account-link {
	display: flex;
	align-items: center;
	gap: 8px;
}

.topic-top {
	justify-content: space-between;
}

.dot {
	width: 10px;
	height: 10px;
	border-radius: 99px;
	display: inline-block;
	flex: 0 0 auto;
}

.topic-count,
.topic-desc,
.thread-excerpt,
.hint,
.byline,
.role,
.person-card-meta,
.footer-inner {
	color: var(--ink-soft);
}

.topic-name {
	font-size: 1.45rem;
	line-height: 1.1;
}

.front-grid,
.thread-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 28px;
	align-items: start;
	padding-bottom: 20px;
}

.thread-list,
.person-list,
.people-grid,
.quote-list,
.name-list,
.facepile {
	list-style: none;
	margin: 0;
	padding: 0;
}

.thread-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.thread-row a {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 18px;
	padding: 16px 18px;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 18px;
	text-decoration: none;
	color: inherit;
	box-shadow: var(--shadow-sm);
}

.thread-row a:hover {
	border-color: #c5cbe0;
	transform: translateY(-1px);
}

.thread-title {
	display: block;
	font-size: 1.45rem;
	line-height: 1.15;
	margin: 4px 0;
}

.thread-meta {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: space-between;
	gap: 10px;
	color: var(--ink-soft);
	font-size: 0.92rem;
	min-width: 140px;
}

.thread-meta strong {
	color: var(--ink);
	font-size: 1.1rem;
}

.pill {
	display: inline-flex;
	align-items: center;
	border-radius: 999px;
	padding: 2px 8px;
	background: var(--paper);
	color: var(--ink-soft);
	letter-spacing: 0;
	text-transform: none;
	font-size: 0.75rem;
}

.pill.is-gold {
	background: var(--gold-soft);
	color: #7a5414;
}

.panel,
.nook-card,
.auth-card,
.post,
.empty,
.danger-panel,
.gate {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow-sm);
}

.panel {
	padding: 16px;
}

.person-list a,
.quote-list a {
	display: flex;
	gap: 12px;
	text-decoration: none;
	padding: 10px 0;
	border-top: 1px solid var(--line);
	color: inherit;
}

.person-list li:first-child a,
.quote-list li:first-child a {
	border-top: 0;
}

.person-list strong,
.quote-list strong {
	display: block;
}

.person-list em {
	display: block;
	font-style: normal;
	color: var(--ink-soft);
	font-size: 0.92rem;
}

.page {
	padding: 28px 0 10px;
}

.page-head {
	margin-bottom: 18px;
}

.page-head h1 .dot {
	width: 14px;
	height: 14px;
	margin-right: 4px;
	transform: translateY(-4px);
}

.narrow {
	max-width: 760px;
}

.thread-layout {
	grid-template-columns: minmax(0, 1fr) 280px;
}

.conversation-head {
	margin-bottom: 16px;
}

.conversation-head h1 {
	font-size: clamp(2rem, 4vw, 3.3rem);
}

.byline,
.edited {
	color: var(--ink-soft);
}

.post {
	padding: 16px 16px 12px;
	margin-top: 12px;
}

.post.is-original {
	padding: 20px;
}

.post-person {
	margin-bottom: 8px;
	align-items: flex-start;
}

.post-person > div {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 8px;
	align-items: baseline;
}

.role {
	font-size: 0.82rem;
}

.post-person a {
	font-weight: 700;
	text-decoration: none;
}

.post-body {
	font-size: 1.05rem;
	line-height: 1.65;
	overflow-wrap: anywhere;
}

.post-body p {
	margin: 0 0 0.8em;
}

.post-body p:last-child {
	margin-bottom: 0;
}

.post-images {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 12px;
}

.post-images a {
	display: block;
	line-height: 0;
}

.post-images img,
.current-image img {
	display: block;
	max-width: min(100%, 420px);
	max-height: 320px;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 14px;
	border: 1px solid var(--line);
	background: #fff;
}

.field input[type="file"] {
	padding: 10px;
	background: #fff;
	border: 1px dashed var(--line);
	border-radius: 14px;
}

.current-images {
	border: 0;
	margin: 0 0 14px;
	padding: 0;
}

.current-images legend {
	font-weight: 700;
	font-size: 0.92rem;
	margin-bottom: 8px;
}

.current-images {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.current-image {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 0.92rem;
	color: var(--ink-soft);
}

.current-image img {
	max-width: 140px;
	max-height: 100px;
}

.post-actions {
	display: flex;
	gap: 14px;
	margin: 10px 0 0;
}

.post-actions a {
	font-weight: 700;
	font-size: 0.92rem;
}

.danger-link {
	color: var(--danger);
}

.host-tools {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin-top: 14px;
}

.host-tools p {
	margin: 0 8px 0 0;
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ink-soft);
}

.messages-heading {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin: 28px 0 8px;
}

.messages-heading span {
	color: var(--ink-soft);
	font-family: var(--sans);
	font-size: 1rem;
}

.reply-box,
.danger-panel,
.gate,
.composer,
.empty {
	margin-top: 16px;
}

.composer,
.danger-panel,
.gate,
.empty,
.reply-box form,
.auth-card {
	padding: 18px;
}

.reply-box form,
.nook-card {
	padding: 18px;
}

.field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 14px;
}

.field span {
	font-weight: 700;
	font-size: 0.92rem;
}

.field textarea {
	min-height: 140px;
	resize: vertical;
	line-height: 1.5;
}

.danger-panel {
	background: var(--danger-soft);
	border-color: var(--danger-line);
}

.danger-panel h2,
.gate h2,
.empty h2,
.empty h1 {
	font-size: 1.6rem;
	margin-bottom: 8px;
}

.avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	color: white;
	font-weight: 700;
	flex: 0 0 auto;
	line-height: 1;
}

.avatar.is-sm { width: 28px; height: 28px; font-size: 0.68rem; }
.avatar.is-md { width: 40px; height: 40px; font-size: 0.85rem; }
.avatar.is-lg { width: 72px; height: 72px; font-size: 1.3rem; }

img.avatar {
	object-fit: cover;
	display: inline-block;
	background: var(--line);
}

.facepile {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 10px;
}

.facepile a {
	text-decoration: none;
}

.name-list li {
	margin: 4px 0;
}

.rail {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.note-panel p,
.auth-switch,
.hint {
	font-size: 0.95rem;
}

.people-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 12px;
}

.person-card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	padding: 16px;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 18px;
	text-decoration: none;
	min-height: 180px;
	box-shadow: var(--shadow-sm);
}

.person-card-name {
	font-size: 1.4rem;
	line-height: 1.1;
	margin-top: 6px;
}

.profile-head {
	display: flex;
	gap: 16px;
	align-items: center;
	margin-bottom: 10px;
}

.quote-list a {
	flex-direction: column;
	gap: 4px;
}

.auth-wrap {
	max-width: 460px;
	margin: 12px auto 40px;
}

.auth-card h1 {
	font-size: clamp(2.2rem, 5vw, 3.2rem);
}

.banner {
	border-radius: 14px;
	padding: 12px 14px;
	margin: 16px 0;
	background: var(--moss-soft);
	color: var(--moss);
	font-weight: 600;
}

.banner.is-error {
	background: var(--danger-soft);
	color: var(--danger);
}

.pager {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 16px;
}

.search-form {
	max-width: 640px;
}

.site-footer {
	margin-top: 48px;
	background: var(--footer);
	color: var(--footer-text);
	border-top: 0;
	padding: 28px 0 36px;
}

.site-footer .footer-inner,
.site-footer .footer-inner p {
	color: var(--footer-text);
}

.footer-links {
	display: flex;
	gap: 14px;
}

.site-footer .footer-links a {
	color: #fff;
	font-weight: 600;
}

.site-footer .footer-links a:hover {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.empty {
	padding: 22px;
}

.messages-empty {
	margin-top: 0;
}

@media (max-width: 900px) {
	.nav-toggle {
		display: inline-flex;
		margin-left: auto;
	}

	.top-search,
	.account-name,
	.hero-stage {
		display: none;
	}

	.nook-nav {
		display: none;
		position: absolute;
		left: 0;
		right: 0;
		top: 100%;
		flex-direction: column;
		background: #fff;
		border-bottom: 1px solid var(--line);
		box-shadow: var(--hwh-sticky-shadow, 0 10px 20px rgba(8, 0, 42, 0.08));
		padding: 8px 16px 14px;
	}

	.nook-nav.is-open {
		display: flex;
	}

	.hero,
	.front-grid,
	.thread-layout,
	.thread-row a {
		grid-template-columns: 1fr;
	}

	.topic-row {
		grid-auto-flow: row;
		grid-auto-columns: unset;
		grid-template-columns: 1fr 1fr;
		overflow: visible;
	}

	.thread-meta {
		align-items: flex-start;
		flex-direction: row;
		flex-wrap: wrap;
	}

	.profile-head {
		align-items: flex-start;
	}

	body.admin-bar .topbar {
		top: 46px;
	}
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		scroll-behavior: auto !important;
		transition: none !important;
	}
}

.nook-shell .thread-row a:focus-visible,
.nook-shell .topic-card:focus-visible,
.nook-shell .button:focus-visible,
.nook-shell .nook-nav a:focus-visible,
.nook-shell .brand:focus-visible {
	outline: 2px solid var(--clay);
	outline-offset: 3px;
}
