:root {
	color-scheme: light;
	--paper: #f8faf7;
	--white: #ffffff;
	--ink: #17221c;
	--muted: #5e6b64;
	--pine: #173b2b;
	--pine-light: #2f5a42;
	--red: #a33b2b;
	--gold: #d2a842;
	--line: #d7ded8;
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	background: var(--paper);
}

body {
	margin: 0;
	min-width: 320px;
	background: var(--paper);
	color: var(--ink);
	font-family: "Noto Serif SC", "Songti SC", SimSun, serif;
	font-size: 16px;
	line-height: 1.85;
}

a {
	color: inherit;
}

img {
	display: block;
	max-width: 100%;
	image-rendering: pixelated;
}

::selection {
	background: var(--gold);
	color: var(--ink);
}

.skip-link {
	position: fixed;
	top: 10px;
	left: 10px;
	z-index: 50;
	padding: 8px 14px;
	background: var(--white);
	color: var(--ink);
	font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
	font-weight: 700;
	transform: translateY(-160%);
}

.skip-link:focus {
	transform: translateY(0);
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 20;
	background: var(--paper);
	border-bottom: 1px solid var(--line);
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	width: min(100%, 1280px);
	min-height: 70px;
	margin: 0 auto;
	padding: 12px 28px;
}

.brand {
	display: flex;
	align-items: baseline;
	gap: 12px;
	text-decoration: none;
}

.brand strong {
	font-size: 1.15rem;
	line-height: 1;
}

.brand span,
.site-header nav,
.eyebrow,
.section-heading p,
.site-footer {
	font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
}

.brand span {
	color: var(--muted);
	font-size: 0.68rem;
	text-transform: uppercase;
}

.site-header nav {
	display: flex;
	align-items: center;
	gap: 26px;
	font-size: 0.84rem;
	font-weight: 700;
}

.site-header nav a {
	position: relative;
	padding: 8px 0;
	text-decoration: none;
}

.site-header nav a::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 3px;
	left: 0;
	height: 2px;
	background: var(--red);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 160ms ease;
}

.site-header nav a:hover::after,
.site-header nav a:focus-visible::after {
	transform: scaleX(1);
}

.site-header nav .portal-link {
	color: var(--gold);
}

.site-header a:focus-visible,
.site-footer a:focus-visible {
	outline: 3px solid var(--gold);
	outline-offset: 4px;
}

.hero {
	position: relative;
	display: grid;
	min-height: min(72svh, 720px);
	isolation: isolate;
	overflow: hidden;
	color: var(--white);
}

.hero picture,
.hero picture img,
.hero-shade {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.hero picture {
	z-index: -2;
}

.hero picture img {
	object-fit: cover;
	object-position: center 58%;
}

.hero-shade {
	z-index: -1;
	background: rgba(12, 25, 17, 0.46);
}

.hero-inner {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	width: min(100%, 1280px);
	margin: 0 auto;
	padding: 72px 28px 58px;
}

.eyebrow {
	margin: 0 0 12px;
	font-size: 0.75rem;
	font-weight: 700;
}

.eyebrow::before {
	content: "";
	display: inline-block;
	width: 30px;
	height: 3px;
	margin-right: 12px;
	vertical-align: middle;
	background: var(--gold);
}

h1 {
	margin: 0;
	font-size: 5.5rem;
	font-weight: 800;
	line-height: 1;
	letter-spacing: 0;
	text-shadow: 0 2px 18px rgba(0, 0, 0, 0.25);
}

.hero-quote {
	max-width: 640px;
	margin: 24px 0 0;
	font-size: 1.12rem;
	line-height: 1.8;
}

.content-section {
	scroll-margin-top: 70px;
	padding: 104px 28px;
}

.section-inner {
	width: min(100%, 1180px);
	margin: 0 auto;
}

.section-heading {
	display: grid;
	grid-template-columns: 52px 1fr;
	align-items: start;
	gap: 18px;
	margin-bottom: 64px;
}

.section-heading > span {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border: 1px solid currentColor;
	color: var(--red);
	font-weight: 700;
	line-height: 1;
}

.section-heading p {
	margin: 0 0 6px;
	color: var(--muted);
	font-size: 0.7rem;
	font-weight: 700;
}

.section-heading h2 {
	margin: 0;
	font-size: 2.45rem;
	line-height: 1.25;
	letter-spacing: 0;
}

.intro-section {
	background: var(--white);
}

.intro-layout {
	display: grid;
	grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.3fr);
	gap: 72px;
}

.members {
	padding-left: 24px;
	border-left: 5px solid var(--red);
}

.members h3 {
	margin: 0 0 26px;
	font-size: 1.25rem;
}

.members dl {
	margin: 0;
}

.members dt {
	font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
	font-weight: 800;
}

.members dd {
	margin: 3px 0 22px;
	color: var(--muted);
	font-size: 0.92rem;
	line-height: 1.6;
}

.town-copy {
	font-size: 1.03rem;
}

.town-copy p {
	margin: 0 0 22px;
}

.join-note {
	margin-top: 32px !important;
	padding: 20px 0;
	border-top: 1px solid var(--pine-light);
	border-bottom: 1px solid var(--pine-light);
	color: var(--pine);
	font-weight: 700;
}

.laws-section {
	background: var(--pine);
	color: #f3f7f3;
}

.laws-section .section-heading > span {
	color: var(--gold);
}

.laws-section .section-heading p {
	color: #b7c8bd;
}

.law-intro {
	max-width: 920px;
	margin: -20px 0 64px;
	padding: 22px 0 22px 24px;
	border-left: 5px solid var(--gold);
	font-size: 1.03rem;
}

.law-groups {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0;
	border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.law-groups > section {
	padding: 34px 30px 0;
	border-left: 1px solid rgba(255, 255, 255, 0.22);
}

.law-groups > section:first-child {
	padding-left: 0;
	border-left: 0;
}

.law-groups > section:last-child {
	padding-right: 0;
}

.law-groups h3 {
	margin: 0 0 28px;
	color: var(--gold);
	font-size: 1.3rem;
}

.law-groups ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

.law-groups li {
	margin: 0;
	padding: 18px 0;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	color: #dbe6de;
	font-size: 0.92rem;
	line-height: 1.75;
}

.law-groups li:first-child {
	border-top: 0;
}

.law-groups strong {
	display: block;
	margin-bottom: 4px;
	color: var(--white);
}

.history-section {
	background: var(--paper);
}

.timeline {
	border-bottom: 1px solid var(--line);
}

.era {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr);
	gap: 56px;
	padding: 54px 0 64px;
	border-top: 1px solid var(--line);
}

.era h3 {
	position: sticky;
	top: 104px;
	align-self: start;
	margin: 0;
	color: var(--red);
	font-size: 1.1rem;
	line-height: 1.55;
}

.era p {
	margin: 0 0 22px;
}

figure {
	margin: 38px 0 0;
}

figure picture,
figure img {
	width: 100%;
}

figure img {
	height: auto;
	background: #d9dfd9;
	box-shadow: 10px 10px 0 #d8dfd9;
}

figcaption {
	margin-top: 16px;
	padding-left: 18px;
	border-left: 3px solid var(--red);
	color: var(--muted);
	font-size: 0.84rem;
}

.site-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 26px max(28px, calc((100% - 1180px) / 2));
	background: var(--ink);
	color: #c9d1cc;
	font-size: 0.72rem;
}

.site-footer p {
	margin: 0;
}

.site-footer > a {
	flex: 0 0 auto;
	color: var(--gold);
}

@media (max-width: 900px) {
	.intro-layout {
		grid-template-columns: 1fr;
		gap: 48px;
	}

	.law-groups {
		grid-template-columns: 1fr;
	}

	.law-groups > section,
	.law-groups > section:first-child,
	.law-groups > section:last-child {
		padding: 34px 0 0;
		border-left: 0;
		border-top: 1px solid rgba(255, 255, 255, 0.22);
	}

	.law-groups > section:first-child {
		border-top: 0;
	}
}

@media (max-width: 680px) {
	.header-inner {
		min-height: 62px;
		padding: 10px 18px;
	}

	.brand span {
		display: none;
	}

	.site-header nav {
		gap: 14px;
		font-size: 0.72rem;
	}

	.hero {
		min-height: 66svh;
	}

	.hero-inner {
		padding: 50px 18px 38px;
	}

	h1 {
		font-size: 3.75rem;
	}

	.hero-quote {
		font-size: 0.96rem;
	}

	.content-section {
		scroll-margin-top: 62px;
		padding: 76px 18px;
	}

	.section-heading {
		grid-template-columns: 44px 1fr;
		gap: 12px;
		margin-bottom: 48px;
	}

	.section-heading > span {
		width: 38px;
		height: 38px;
	}

	.section-heading h2 {
		font-size: 2rem;
	}

	.law-intro {
		margin-top: 0;
		margin-bottom: 42px;
		padding-left: 16px;
	}

	.era {
		display: block;
		padding: 44px 0 52px;
	}

	.era h3 {
		position: static;
		margin-bottom: 24px;
	}

	figure {
		margin-top: 28px;
	}

	figure img {
		box-shadow: 6px 6px 0 #d8dfd9;
	}

	.site-footer {
		align-items: flex-start;
		padding: 24px 18px;
	}
}

@media (max-width: 390px) {
	.brand strong {
		font-size: 1rem;
	}

	.site-header nav {
		gap: 10px;
		font-size: 0.68rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.site-header nav a::after {
		transition: none;
	}
}
