/*
 * base.css — 素の HTML 要素の土台。
 * コンポーネント固有の見た目はここに書かない。
 */

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	/* 固定ヘッダーにアンカーが隠れないように。旧目次の #toc_id* にも効く。 */
	scroll-padding-top: var(--picico-header-height);
}

@media (min-width: 64rem) {
	html {
		scroll-padding-top: var(--picico-header-height-pc);
	}
}

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

body {
	margin: 0;
	overflow-wrap: anywhere;
	color: var(--picico-color-text);
	background-color: var(--picico-color-background);
	font-family: var(--picico-font-body);
	font-size: var(--picico-font-size-md);
	line-height: var(--picico-line-height-body);
	letter-spacing: var(--picico-letter-spacing-body);
	-webkit-font-smoothing: antialiased;
}

:where(a) {
	color: var(--picico-color-link);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

:where(a:hover) {
	color: var(--picico-color-link-hover);
}

/* フォーカスは必ず見える状態を保つ（指示書 §27）。 */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--picico-color-focus);
	outline-offset: 2px;
}

:where(hr) {
	height: 1px;
	border: 0;
	background-color: var(--picico-color-border);
}

:where(figure) {
	margin: 0;
}

:where(iframe, video) {
	max-width: 100%;
}

/*
 * 本文へスキップ（.pc-skip-link）と .pc-visually-hidden は
 * components.css（Worker A）の担当なのでここには置かない。
 * コアが出力する .screen-reader-text だけはここで面倒を見る。
 */

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	border: 0;
	clip-path: inset(50%);
	white-space: nowrap;
}
