:root {
	--bg: #ffffff;
	--bg-soft: #f5f7fa;
	--text: #141b26;
	--muted: #4f5b6b;
	--faint: #7a8494;
	--line: #e1e6ed;
	--accent: #1f4fbf;
	--accent-soft: #e9effc;
	--warn-soft: #fbf3e2;
	--code-bg: #f1f4f8;
	--code-text: #1d2733;
	--shot-bg: #121212;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--bg: #0f141b;
		--bg-soft: #161d27;
		--text: #e6ebf2;
		--muted: #a7b1bf;
		--faint: #7f8a99;
		--line: #263040;
		--accent: #7aa7ff;
		--accent-soft: #1a2640;
		--warn-soft: #2a2213;
		--code-bg: #171f2a;
		--code-text: #dbe3ee;
	}
}
:root[data-theme="dark"] {
	--bg: #0f141b;
	--bg-soft: #161d27;
	--text: #e6ebf2;
	--muted: #a7b1bf;
	--faint: #7f8a99;
	--line: #263040;
	--accent: #7aa7ff;
	--accent-soft: #1a2640;
	--warn-soft: #2a2213;
	--code-bg: #171f2a;
	--code-text: #dbe3ee;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 17px;
	line-height: 1.62;
}
a { color: var(--accent); }
code, pre {
	font-family: ui-monospace, "Cascadia Code", Consolas, "Liberation Mono", monospace;
}
code {
	font-size: 0.86em;
	background: var(--code-bg);
	color: var(--code-text);
	padding: 1px 5px;
	border-radius: 4px;
	overflow-wrap: anywhere;
}
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* header */
.top {
	display: flex; align-items: center; justify-content: space-between;
	gap: 16px; flex-wrap: wrap;
	padding: 22px 0 18px;
	border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.brand img {
	width: 52px; height: 52px; border-radius: 50%;
	background: #fff; border: 1px solid var(--line); padding: 5px; object-fit: contain;
}
.brand b { display: block; font-size: 1.25rem; letter-spacing: 0.05em; }
.brand span { display: block; color: var(--muted); font-size: 0.9rem; }
nav { display: flex; align-items: center; gap: 6px 20px; flex-wrap: wrap; font-size: 0.95rem; }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover { color: var(--accent); }
nav a.lang {
	border: 1px solid var(--line); border-radius: 999px; padding: 2px 12px;
	color: var(--text);
}

/* home */
.hero { padding: 56px 0 36px; }
.hero h1 {
	margin: 0 0 18px;
	font-size: clamp(1.8rem, 4.6vw, 2.8rem);
	line-height: 1.15; letter-spacing: -0.02em;
	max-width: 820px;
}
.hero p { margin: 0 0 14px; max-width: 760px; color: var(--muted); font-size: 1.12rem; }
.facts {
	display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px; margin-top: 30px;
}
.fact {
	background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px;
	padding: 14px 16px;
}
.fact b { display: block; font-size: 1.05rem; }
.fact span { color: var(--muted); font-size: 0.92rem; }

section { padding: 40px 0 8px; }
h2 { margin: 0 0 8px; font-size: 1.65rem; line-height: 1.25; letter-spacing: -0.01em; }
.lead { margin: 0 0 24px; color: var(--muted); max-width: 760px; font-size: 1.05rem; }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.card { border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; }
.card h3 { margin: 0 0 8px; font-size: 1.08rem; line-height: 1.35; }
.card p { margin: 0; color: var(--muted); font-size: 0.98rem; }

.article-card {
	display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 24px; align-items: center;
	border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px;
	background: var(--bg-soft); text-decoration: none; color: inherit;
}
.article-card:hover { border-color: var(--accent); }
.article-card .kicker { color: var(--faint); font-size: 0.88rem; margin: 0 0 6px; }
.article-card h3 { margin: 0 0 8px; font-size: 1.3rem; line-height: 1.3; color: var(--text); }
.article-card p { margin: 0 0 10px; color: var(--muted); }
.article-card .more { color: var(--accent); font-weight: 600; }
.article-card img { width: 100%; height: auto; border-radius: 8px; display: block; background: var(--shot-bg); }
.more-link { margin: 14px 0 0; }

.note {
	background: var(--warn-soft); border: 1px solid var(--line); border-radius: 14px;
	padding: 20px 24px; max-width: 860px;
}
.note p { margin: 0 0 10px; }
.note p:last-child { margin-bottom: 0; }

.list { border: 1px solid var(--line); border-radius: 14px; padding: 20px 24px; max-width: 860px; }
.list p { margin: 0 0 8px; }
.list p:last-child { margin-bottom: 0; }

footer {
	margin-top: 48px; padding: 22px 0 36px; border-top: 1px solid var(--line);
	color: var(--faint); font-size: 0.9rem;
	display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}

/* article */
.article { max-width: 760px; margin: 0 auto; padding: 44px 0 0; }
.crumbs { font-size: 0.92rem; color: var(--faint); margin: 0 0 18px; }
.crumbs a { color: var(--muted); }
.article h1 {
	margin: 0 0 14px; font-size: clamp(1.8rem, 4.4vw, 2.5rem);
	line-height: 1.15; letter-spacing: -0.02em;
}
.article .standfirst { font-size: 1.15rem; color: var(--muted); margin: 0 0 12px; }
.article .meta { color: var(--faint); font-size: 0.9rem; margin: 0 0 30px; }
.article h2 { margin: 38px 0 10px; font-size: 1.45rem; }
.article p { margin: 0 0 16px; }
.article ul, .article ol { margin: 0 0 16px; padding-left: 22px; }
.article li { margin: 6px 0; }
.article blockquote {
	margin: 0 0 18px; padding: 10px 18px;
	border-left: 3px solid var(--accent); background: var(--bg-soft); border-radius: 0 10px 10px 0;
	color: var(--muted);
}
.article blockquote p { margin: 0; }
.article pre {
	margin: 0 0 18px; padding: 16px 18px;
	background: var(--code-bg); color: var(--code-text);
	border: 1px solid var(--line); border-radius: 10px;
	font-size: 0.84rem; line-height: 1.55;
	overflow-x: auto; max-width: 100%;
	tab-size: 8;
}
.article pre code { background: none; padding: 0; font-size: inherit; overflow-wrap: normal; }
.article pre .c { color: var(--faint); }
.article figure { margin: 6px 0 22px; }
.article figure img {
	display: block; width: 100%; height: auto;
	border-radius: 10px; background: var(--shot-bg); border: 1px solid var(--line);
}
.article figcaption { font-size: 0.9rem; color: var(--faint); margin-top: 8px; }
.stats {
	display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 6px 0 22px;
}
.stat { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--bg-soft); }
.stat b { display: block; font-size: 1.5rem; line-height: 1.2; }
.stat span { font-size: 0.86rem; color: var(--muted); }
.diagram { margin: 6px 0 22px; overflow-x: auto; }
.diagram svg { display: block; width: 100%; height: auto; }
.diagram .box { fill: var(--bg-soft); stroke: var(--line); stroke-width: 1.5; }
.diagram .box-hi { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.5; }
.diagram .t { fill: var(--text); font: 600 15px -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.diagram .s { fill: var(--muted); font: 13px -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.diagram .arrow { stroke: var(--faint); stroke-width: 1.5; fill: none; }
.diagram .head { fill: var(--faint); }
.tips li { margin: 10px 0; }
.back { margin: 34px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: 0.95rem; }

@media (max-width: 900px) {
	.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.article-card { grid-template-columns: 1fr; }
	.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
	.grid { grid-template-columns: 1fr; }
	.hero { padding-top: 36px; }
	.article { padding-top: 28px; }
	.diagram svg { min-width: 560px; }
}
@media (max-width: 420px) {
	.facts { grid-template-columns: 1fr; }
}
