/*
 * 旧サイトの CSS（legacy/。html:root 付きで強さをそろえてある）の前に読む「下地合わせ」。
 * テーマ・ONEsta・WordPress が付ける見た目のうち、旧サイトに無かったものを消す。
 * ここで消したものに旧サイトの指定があれば、後から読む legacy/ の指定が勝つ。
 */

/* 本文の文字：旧サイトの指定（reset.css・common.css の body）を使う。ONEsta の書体設定は旧 CSS（html:root body）の方が強いので、ここでは折り返し（ONEstar の break-word）だけ戻す */
:root body {
	overflow-wrap: normal;
	word-break: normal;
}

/* 見出し：旧サイトは色・書体・行の高さ・字間を親から受け継ぐ（テーマの見出し設定を打ち消す） */
:root :where(.wp-site-blocks) :is(h1, h2, h3, h4, h5, h6) {
	color: inherit;
	font-family: inherit;
	letter-spacing: inherit;
	line-height: inherit;
}

/* ブロックの間の空き：旧サイトには無い（WordPress のブロック間隔を打ち消す）。
   強さは WordPress の :root :where(.is-layout-flow) > * より 1 つ上（body の分）。旧サイトの要素への指定（html:root … h3 の下の余白など）には負けるようにする */
:root body :where(.wp-site-blocks, .wp-site-blocks *) > * {
	margin-block-start: 0;
	margin-block-end: 0;
}

/* 箱の大きさの数え方：旧サイトは、リセットの CSS で指定した要素以外（::before・::after など）はブラウザの標準（content-box）。
   テーマは全部を border-box にするので、旧サイトに合わせて戻す（旧 CSS で指定のあるものは旧 CSS が勝つ） */
:root :where(.wp-site-blocks) *,
:root :where(.wp-site-blocks) ::before,
:root :where(.wp-site-blocks) ::after {
	box-sizing: content-box;
}
