/* from src/layouts/Base.astro */
/*
			 * Establish layer order: "base" has lower priority than unlayered
			 * styles, so theme.css overrides always win regardless of source
			 * order in the bundled CSS.
			 */
			@layer base;

			@layer base {
				*,
				*::before,
				*::after {
					box-sizing: border-box;
					margin: 0;
					padding: 0;
				}

				/*
				 * Design tokens live in src/styles/tokens.css. Colors are
				 * defined with light-dark(); these rules pin the scheme when
				 * the footer switcher sets an explicit choice. With no class,
				 * color-scheme: light dark follows the OS preference. The
				 * @supports guard keeps the toggle from forcing dark UA form
				 * controls on browsers stuck on the plain-light fallback.
				 */
				@supports (color: light-dark(#000, #fff)) {
					:root.light {
						color-scheme: light;
					}

					:root.dark {
						color-scheme: dark;
					}
				}

				html {
					scroll-behavior: smooth;
				}

				body {
					font-family: var(--font-body);
					font-size: var(--font-size-base);
					line-height: var(--leading-normal);
					color: var(--color-text);
					background: var(--color-bg);
					-webkit-font-smoothing: antialiased;
					min-height: 100vh;
				}

				a:where(:not([class*="emdash"]):not([class*="ec-"])) {
					color: currentColor;
					text-decoration: none;
				}

				/* Inline links in authored content (Portable Text renders bare
				   <a> tags) need a visible style; component links restyle
				   themselves via classes. */
				p a:not([class]),
				li a:not([class]) {
					color: var(--color-brand);
					text-decoration: underline;
					text-underline-offset: 2px;
				}

				img {
					max-width: 100%;
					height: auto;
					display: block;
				}

				h1,
				h2,
				h3,
				h4,
				h5,
				h6 {
					font-family: var(--font-heading);
					font-weight: var(--font-weight-heading);
					line-height: var(--leading-snug);
					letter-spacing: var(--tracking-snug);
				}

				h1 {
					font-size: var(--font-size-5xl);
				}
				h2 {
					font-size: var(--font-size-3xl);
				}
				h3 {
					font-size: var(--font-size-2xl);
				}
				h4 {
					font-size: var(--font-size-xl);
				}

				/* Utility classes */
				.container {
					max-width: var(--wide-width);
					margin: 0 auto;
					padding: 0 var(--spacing-lg);
				}

				.section {
					padding: var(--spacing-5xl) 0;
				}

				.section-header {
					text-align: center;
					max-width: var(--max-width);
					margin: 0 auto var(--spacing-4xl);
				}

				.section-headline {
					font-size: var(--font-size-3xl);
					font-weight: var(--font-weight-display);
				}

				.section-subheadline {
					margin-top: var(--spacing-md);
					font-size: var(--font-size-lg);
					color: var(--color-muted);
				}

				.icon-tile {
					width: 48px;
					height: 48px;
					display: flex;
					align-items: center;
					justify-content: center;
					flex-shrink: 0;
					font-size: 1.5rem;
					color: var(--color-on-brand);
					background: var(--gradient-brand);
					border-radius: var(--radius);
				}

				.btn {
					display: inline-flex;
					align-items: center;
					justify-content: center;
					gap: var(--spacing-sm);
					padding: var(--spacing-sm) var(--spacing-lg);
					font-family: inherit;
					font-size: var(--font-size-sm);
					font-weight: 600;
					border-radius: var(--radius);
					cursor: pointer;
					transition:
						background var(--transition-fast),
						transform var(--transition-fast),
						box-shadow var(--transition-fast);
				}

				.btn:hover {
					transform: translateY(-1px);
				}

				.btn:active {
					transform: translateY(0);
				}

				.btn-primary {
					color: var(--color-on-brand);
					background: var(--gradient-brand-strong);
					border: none;
					transition:
						background 0.3s ease,
						box-shadow 0.3s ease,
						transform var(--transition-fast);
				}

				.btn-primary:hover {
					background: var(--gradient-brand);
					box-shadow: var(--shadow-lg);
				}

				.btn-secondary {
					color: var(--color-text);
					background: transparent;
					border: 1px solid var(--color-border);
				}

				.btn-secondary:hover {
					background: var(--color-surface);
					border-color: var(--color-muted);
				}

				.btn-lg {
					padding: var(--spacing-md) var(--spacing-xl);
					font-size: var(--font-size-base);
				}
			}

/* from src/layouts/Base.astro */
main {
				min-height: calc(100vh - 200px);
			}
















			@media (max-width: 768px) {




				h1 {
					font-size: var(--font-size-4xl);
				}
				h2 {
					font-size: var(--font-size-2xl);
				}
			}

			@media (max-width: 540px) {
				.nav {
					flex-wrap: wrap;
					row-gap: var(--spacing-md);
					justify-content: space-between;
				}

				.nav-links {
					order: 3;
					width: 100%;
					justify-content: flex-end;
					margin-left: 0;
				}
			}

			@media (max-width: 480px) {
			}

/* from src/components/insights/InsightList.astro */
.insight-section {
		padding-block: 3rem 4rem;
	}
	.insight-heading {
		font-size: clamp(2rem, 4vw, 2.75rem);
		font-weight: var(--font-weight-display, 800);
		margin-bottom: 2rem;
	}
	.insight-empty {
		color: var(--color-muted);
	}
	.insight-list {
		list-style: none;
		margin: 0;
		padding: 0;
		display: grid;
		gap: 1.25rem;
	}
	.insight-card {
		border: 1px solid var(--color-border);
		border-radius: 0.75rem;
		background: var(--color-surface);
		overflow: hidden;
		transition: border-color 0.15s ease;
	}
	.insight-card:hover {
		border-color: var(--color-brand);
	}
	.insight-card-link {
		display: block;
		color: inherit;
		text-decoration: none;
		padding: 1.25rem 1.5rem;
	}
	.insight-card-img {
		width: 100%;
		max-height: 220px;
		object-fit: cover;
		border-radius: 0.5rem;
		margin-bottom: 1rem;
	}
	.insight-card-date {
		font-size: 0.8125rem;
		color: var(--color-muted);
	}
	.insight-card-title {
		font-size: 1.25rem;
		margin: 0.375rem 0 0.5rem;
	}
	.insight-card-excerpt {
		color: var(--color-muted);
		margin: 0;
	}

/* from src/components/insights/InsightArticle.astro */
.article-body .insight-gate {
		padding: var(--spacing-xl);
		border: 1px solid var(--color-border);
		border-radius: var(--radius-lg);
		background: var(--color-surface);
		text-align: center;
	}
	.article-body .insight-gate p {
		margin-bottom: var(--spacing-lg);
	}
	/* zenmat.css 中不分层的 a { color: inherit } 会盖过 @layer base 里 .btn-primary 的文字色 */
	.article-body .insight-gate a.btn-primary {
		color: var(--color-on-brand);
	}
	.article {
		padding-block: 3rem 4rem;
	}
	.article-container {
		max-width: 46rem;
	}
	.article-meta-row {
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-bottom: 2rem;
	}
	.article-back {
		color: var(--color-muted);
		text-decoration: none;
		font-size: 0.9rem;
	}
	.article-back:hover {
		color: var(--color-brand-strong);
	}
	.article-cover {
		width: 100%;
		border-radius: 0.75rem;
		margin-bottom: 1.5rem;
	}
	.article-date {
		color: var(--color-muted);
		font-size: 0.9rem;
	}
	.article-title {
		font-size: clamp(1.75rem, 4vw, 2.5rem);
		font-weight: var(--font-weight-display, 800);
		line-height: 1.2;
		color: var(--gold-500);
		margin: 0.5rem 0 0.75rem;
	}
	.article-body .article-excerpt {
		font-size: 1.125rem;
		color: var(--color-muted);
		margin-bottom: 1.5rem;
	}
	.article-body-status {
		color: var(--color-muted);
	}
	.article-body h1,
	.article-body h2,
	.article-body h3,
	.article-body h4 {
		color: var(--color-text);
	}
	.article-body h1 {
		font-size: 1.625rem;
		margin: 2rem 0 0.75rem;
	}
	.article-body h2 {
		font-size: 1.5rem;
		margin: 2rem 0 0.75rem;
	}
	.article-body h3 {
		font-size: 1.25rem;
		margin: 1.5rem 0 0.5rem;
	}
	.article-body h4 {
		font-size: 1.0625rem;
		margin: 1.25rem 0 0.5rem;
	}
	.article-body p {
		line-height: 1.75;
		margin: 0 0 1rem;
	}

/* from src/components/legal/LegalDocument.astro */
.legal-meta {
		margin-top: 4px;
		font-size: 14px;
		opacity: 0.75;
	}
	.legal-body {
		padding: 56px 0 96px;
	}
	/* 与页头左对齐，只限制行宽 */
	.legal-container > * {
		max-width: 820px;
	}
	.legal-note {
		margin-bottom: 24px;
		padding: 12px 16px;
		font-size: 14px;
		line-height: 1.6;
		color: var(--gray);
		background: var(--light);
		border-radius: 8px;
	}
	.legal-note-warn {
		color: var(--navy-950);
		background: #fbf4e4;
	}
	.legal-note a {
		color: var(--navy-700);
		text-decoration: underline;
	}
	.legal-content {
		color: var(--dark);
		font-size: 16px;
		line-height: 1.8;
	}
	.legal-content h2 {
		margin: 40px 0 12px;
		font-size: 22px;
		line-height: 1.35;
		color: var(--navy-950);
	}
	.legal-content h3 {
		margin: 28px 0 8px;
		font-size: 17px;
		color: var(--navy-950);
	}
	.legal-content p {
		margin: 0 0 14px;
	}
	.legal-content ul,
	.legal-content ol {
		margin: 0 0 14px;
		padding-left: 1.4em;
	}
	.legal-content li {
		margin-bottom: 6px;
	}
	.legal-content ul li {
		list-style: disc;
	}
	.legal-content ol li {
		list-style: decimal;
	}
	.legal-content a {
		color: var(--navy-700);
		text-decoration: underline;
	}
	.legal-history {
		margin-top: 56px;
		padding-top: 32px;
		border-top: 1px solid #e2e8f0;
	}
	.legal-history h2 {
		font-size: 18px;
		color: var(--navy-950);
		margin-bottom: 12px;
	}
	.legal-history ol {
		list-style: none;
	}
	.legal-history li {
		padding: 12px 0;
		border-bottom: 1px solid #eef2f6;
		font-size: 14px;
	}
	.legal-history li a {
		font-weight: 600;
		color: var(--navy-700);
	}
	.legal-history li.active a {
		color: var(--navy-950);
	}
	.legal-history li p {
		margin-top: 4px;
		color: var(--gray);
	}
	.legal-badge {
		margin-left: 8px;
		padding: 2px 8px;
		font-size: 12px;
		color: var(--navy-950);
		background: rgba(201, 162, 77, 0.2);
		border-radius: 999px;
	}
	.legal-date {
		margin-left: 12px;
		color: var(--gray);
	}


/* The old static site is light-only; pin tokens so legacy unlayered colors align. */
:root { color-scheme: light; }
body { color: var(--color-text); background: var(--color-bg); }
.insight-card { color: var(--color-text); }
/* zenmat.css has an unlayered a { color: inherit } that beats button colors. */
a.btn-primary { color: var(--color-on-brand); }
a.btn-secondary { color: var(--color-text); }
