/* ==========================================================================
   Foundation — トークン（CSS 変数）と最小限の基本スタイル
   広いリセットはしない。基本スタイルは :where() で詳細度 0 にし、
   プラグインやブロックのスタイルが後から勝てるようにする。
   ========================================================================== */

:root {
	/* 色 */
	--color-ink: #182b43;          /* 濃紺：本文・見出し（生成りに対して 13.27:1） */
	--color-paper: #f8f6f1;        /* 生成り：ページの地 */
	--color-accent: #245a4c;       /* 深緑：柱2・ラベル・フォーカス（7.36:1） */
	--color-ink-muted: #4a5666;    /* 補足文（6.91:1） */
	--color-ink-subtle: #5b6573;   /* 日付・注記（5.47:1） */
	--color-surface: #ffffff;
	--color-band: #efebe2;
	--color-line: #dcd6ca;         /* 罫線（装飾のみ。文字には使わない） */
	--color-line-strong: #8f8778;  /* 入力欄・ボタンの枠（生成りに対して 3.29:1） */
	--color-on-dark: #f8f6f1;
	--color-on-dark-muted: #c9cfd8;

	/* 文字 */
	--font-sans: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", YuGothic, "Noto Sans JP", Meiryo, sans-serif;
	--font-serif: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, "Noto Serif JP", serif;
	--fs-body: 1.0625rem;          /* 17px */
	--lh-body: 1.8;
	--fs-h1: clamp(1.5625rem, 1.1rem + 2vw, 2.875rem);
	--fs-h2: clamp(1.375rem, 1.1rem + 1vw, 1.6875rem);
	--fs-h3: clamp(1.1875rem, 1.1rem + 0.4vw, 1.3125rem);
	--fs-small: 0.875rem;          /* 14px */
	--fs-xsmall: 0.8125rem;        /* 13px（注記のみ） */
	--measure: 40em;

	/* 余白 */
	--space-1: 4px;
	--space-2: 8px;
	--space-3: 12px;
	--space-4: 16px;
	--space-5: 24px;
	--space-6: 32px;
	--space-7: 48px;
	--space-8: 64px;
	--space-9: 96px;
	--gutter: 20px;
	--container: 1200px;
	--container-narrow: 760px;

	/* 形 */
	--radius-s: 6px;
	--radius-m: 10px;
	--tap: 44px;
	--focus: 3px solid var(--color-accent);
}

@media (min-width: 768px) {
	:root {
		--fs-body: 1.125rem;       /* 18px */
		--gutter: 40px;
	}
}

:where(html) {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: var(--space-5);
}

:where(body.srjm) {
	margin: 0;
	background: var(--color-paper);
	color: var(--color-ink);
	font-family: var(--font-sans);
	font-size: var(--fs-body);
	line-height: var(--lh-body);
	overflow-wrap: anywhere;
	line-break: strict;
}

:where(.l-site) *,
:where(.l-site) *::before,
:where(.l-site) *::after {
	box-sizing: border-box;
}

:where(.l-site) :where(img, svg, video) {
	max-width: 100%;
	height: auto;
}

:where(.l-site) :where(a) {
	color: var(--color-ink);
	text-decoration-line: underline;
	text-decoration-color: #9aa3ae;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.25em;
}

:where(.l-site) :where(a:hover) {
	color: var(--color-accent);
	text-decoration-color: currentColor;
}

:where(.l-site) :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: var(--focus);
	outline-offset: 3px;
}

:where(.l-site) :where(h1, h2, h3, h4, h5, h6) {
	line-height: 1.5;
	font-weight: 700;
}

:where(.l-site) :where(button, input, select, textarea) {
	font: inherit;
	color: inherit;
}
