/*
 * 管理画面で入れた本文の HTML（固定ページ・サービス詳細など）に使われている部品のクラスに、v2 の見た目を当てる。
 * 本文（DB）は書き換えないので、クラス名は今の本文のまま（heading--brd01・card-list01・table--matrix など 93 種類）。
 * 効かせるのは .v2-content の中だけ（v2 のテンプレートが本文をこれで囲む）。
 * 部品集との対応: 見出し・注記（P03）・表（P04）・手順（P05）・フォーム（P12）・よくある質問（P13）
 */
@layer components {
	/* ===== 枠と余白（本文に書かれている Tailwind の小さなクラスのうち、使われているものだけ） ===== */
	.v2-content {
		line-height: 1.9;
	}

	.v2-content .container800,
	.v2-content .container1040,
	.v2-content .container1240 {
		width: 100%;
		margin-inline: auto;
		padding-inline: var(--gutter);
	}

	.v2-content .container800 {
		max-width: calc(800px + var(--gutter) * 2);
	}

	.v2-content .container1040 {
		max-width: calc(1040px + var(--gutter) * 2);
	}

	.v2-content .container1240 {
		max-width: calc(var(--w-content) + var(--gutter) * 2);
	}

	.v2-content .pt-16 { padding-top: 4rem; }
	.v2-content .pb-24 { padding-bottom: 6rem; }
	.v2-content .m-0 { margin: 0; }
	.v2-content .m-2 { margin: 0.5rem; }
	.v2-content .my-0 { margin-block: 0; }
	.v2-content .mt-0 { margin-top: 0; }
	.v2-content .mb-0 { margin-bottom: 0; }
	.v2-content .mt-6 { margin-top: 1.5rem; }
	.v2-content .mt-8 { margin-top: 2rem; }
	.v2-content .mt-12 { margin-top: 3rem; }
	.v2-content .mt-16 { margin-top: 4rem; }
	.v2-content .leading-loose { line-height: 2; }
	.v2-content .text-center { text-align: center; }
	.v2-content .text-right { text-align: right; }
	.v2-content .overflow-x-auto { overflow-x: auto; }

	@media (min-width: 768px) {
		.v2-content .md\:pb-32 { padding-bottom: 8rem; }
		.v2-content .md\:mt-20 { margin-top: 5rem; }
	}

	@media (min-width: 1024px) {
		.v2-content .lg\:pt-28 { padding-top: 7rem; }
		.v2-content .lg\:pb-40 { padding-bottom: 10rem; }
		.v2-content .lg\:mt-16 { margin-top: 4rem; }
		.v2-content .lg\:mt-24 { margin-top: 6rem; }
	}

	.v2-content p {
		margin: 1.2em 0;
	}

	.v2-content img {
		display: block;
		height: auto;
		margin-inline: auto;
	}

	.v2-content a:not([class]),
	.v2-content .text-link01 {
		color: var(--c-accent-text);
		text-decoration: underline;
		text-underline-offset: 3px;
	}

	/* 本文の中に置いた部品（業種・課題の入口とカード）のリンクは、本文のリンクの色と下線にしない */
	.v2-content .guide-nav a,
	.v2-content .guide-cards a {
		color: var(--c-ink);
		text-decoration: none;
	}

	.v2-content strong {
		font-weight: 700;
	}

	.v2-content .bx {
		font-size: 1.1em;
		vertical-align: -0.1em;
	}

	/* クラスの無いリストは記事の本文と同じ印（斜めの緑の札・番号は緑の英字） */
	.v2-content ul:not([class]) {
		margin: 1.2em 0;
		padding: 0;
		list-style: none;
	}

	.v2-content ul:not([class]) > li {
		position: relative;
		padding-left: 22px;
	}

	.v2-content ul:not([class]) > li::before {
		content: "";
		position: absolute;
		left: 2px;
		top: 0.8em;
		width: 8px;
		height: 8px;
		background: var(--c-accent);
		transform: skewX(-20deg);
	}

	.v2-content ol:not([class]) {
		margin: 1.2em 0;
		padding-left: 1.6em;
	}

	.v2-content ol:not([class]) > li::marker {
		font-family: var(--f-en);
		font-weight: 600;
		color: var(--c-accent-text);
	}

	.v2-content li + li {
		margin-top: 0.3em;
	}

	/* ===== 見出し（P03） ===== */
	/* h2: 斜めに切った紫の札＋下の線 */
	.v2-content .heading--brd01 {
		position: relative;
		display: flex;
		align-items: center;
		gap: var(--sp-2);
		margin: 3em 0 1.2em;
		padding: 0 0 14px 26px;
		border-bottom: 1px solid var(--c-line);
		font-size: var(--fs-xl);
		line-height: 1.55;
	}

	.v2-content .heading--brd01::before {
		content: "";
		position: absolute;
		left: 0;
		top: 0.3em;
		width: 12px;
		height: 1.1em;
		background: var(--c-brand);
		clip-path: polygon(40% 0, 100% 0, 60% 100%, 0 100%);
	}

	.v2-content .heading-icon {
		color: var(--c-accent-text);
	}

	/* h3: 紫と緑の細い斜めの札 2 本 */
	.v2-content .heading--brd02,
	.v2-content .heading--line01,
	.v2-content .heading--brd-b01 {
		position: relative;
		margin: 2.2em 0 0.8em;
		padding-left: 30px;
		font-size: var(--fs-lg);
		line-height: 1.6;
	}

	.v2-content .heading--brd02::before,
	.v2-content .heading--brd02::after,
	.v2-content .heading--line01::before,
	.v2-content .heading--line01::after,
	.v2-content .heading--brd-b01::before,
	.v2-content .heading--brd-b01::after {
		content: "";
		position: absolute;
		top: 0.35em;
		width: 7px;
		height: 18px;
		clip-path: polygon(45% 0, 100% 0, 55% 100%, 0 100%);
	}

	.v2-content .heading--brd02::before,
	.v2-content .heading--line01::before,
	.v2-content .heading--brd-b01::before {
		left: 0;
		background: var(--c-brand);
	}

	.v2-content .heading--brd02::after,
	.v2-content .heading--line01::after,
	.v2-content .heading--brd-b01::after {
		left: 10px;
		background: var(--c-accent);
	}

	/* 中央の見出し（送信完了など） */
	.v2-content .heading--mid01 {
		margin: 0 0 var(--sp-6);
		font-size: var(--fs-xl);
		line-height: 1.5;
	}

	.v2-content .heading--brd01 + *,
	.v2-content .heading--brd02 + *,
	.v2-content .heading--line01 + * {
		margin-top: 0;
	}

	/* ===== 注記 ===== */
	.v2-content .note01 {
		position: relative;
		margin: 1.5em 0;
		padding: var(--sp-4) var(--sp-5);
		border-radius: var(--radius-md);
		background: var(--c-soft);
		font-size: var(--fs-sm);
	}

	/* ===== ページ内の目次（技術・ツールの一覧の上） ===== */
	.v2-content .toc-list01 {
		display: flex;
		flex-wrap: wrap;
		gap: var(--sp-2);
		margin: var(--sp-5) 0;
		padding: 0;
		list-style: none;
	}

	.v2-content .toc-list01 a {
		display: inline-flex;
		align-items: center;
		gap: 6px;
		min-height: 40px;
		padding: 0 var(--sp-4);
		border: 1px solid var(--c-line-strong);
		border-radius: var(--radius-pill);
		background: var(--c-bg);
		font-size: var(--fs-sm);
		font-weight: 700;
		text-decoration: none;
	}

	.v2-content .toc-list01 a:hover {
		border-color: var(--c-brand);
	}

	.v2-content .toc-list01 .bx {
		color: var(--c-accent-text);
	}

	/* ===== カード（技術・ツール・サービスの一覧） ===== */
	.v2-content .card-list01 {
		display: grid;
		grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
		gap: var(--sp-3);
		margin: var(--sp-5) 0;
		padding: 0;
		list-style: none;
	}

	.v2-content .card-list01--grid {
		grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
	}

	.v2-content .card-list01 .box {
		position: relative;
		height: 100%;
		padding: var(--sp-4) var(--sp-4) var(--sp-4) 28px;
		border: 1px solid var(--c-line);
		border-radius: var(--radius-md);
		background: var(--c-bg);
	}

	.v2-content .card-list01 .box::before {
		content: "";
		position: absolute;
		left: 11px;
		top: calc(var(--sp-4) + 0.25em);
		width: 6px;
		height: 1.1em;
		background: var(--c-accent);
		clip-path: var(--clip-tag);
	}

	.v2-content .card-list01 .ttl {
		margin: 0;
		font-weight: 700;
		line-height: 1.6;
	}

	.v2-content .card-list01 .text {
		margin: 6px 0 0;
		font-size: var(--fs-sm);
		line-height: 1.75;
		color: var(--c-ink-sub);
	}

	.v2-content .card-list01 .num {
		display: block;
		margin-top: 6px;
		font-size: var(--fs-xs);
	}

	/* ===== 表（P04） ===== */
	.v2-content table {
		width: 100%;
		margin: 1.5em 0;
		border-collapse: collapse;
		font-size: var(--fs-md);
		line-height: 1.75;
	}

	.v2-content th,
	.v2-content td {
		padding: 0.8em 1em;
		border: 1px solid var(--c-line);
		text-align: left;
		vertical-align: top;
	}

	/* 項目の表（会社概要・個人情報の利用目的など）: 項目は薄い地、見出しの下に紫の線 */
	.v2-content .table--brd01 th,
	.v2-content .table--type01 th {
		width: 28%;
		background: var(--c-soft);
		font-weight: 700;
		white-space: nowrap;
	}

	.v2-content .table--brd01 tr:first-child th,
	.v2-content .table--brd01 tr:first-child td,
	.v2-content .table--type01 tr:first-child th,
	.v2-content .table--type01 tr:first-child td {
		border-top: 2px solid var(--c-brand);
	}

	@media (max-width: 599px) {
		.v2-content .table--brd01 th,
		.v2-content .table--brd01 td,
		.v2-content .table--type01 th,
		.v2-content .table--type01 td {
			display: block;
			width: auto;
			white-space: normal;
		}

		.v2-content .table--brd01 td,
		.v2-content .table--type01 td {
			border-top: 0;
		}
	}

	/* 比べる表（契約形態・費用など）: 見出しの行を紫、1 列目を固定して横に送る */
	.v2-content .table--matrix {
		min-width: 560px;
	}

	.v2-content .table--matrix thead th {
		background: var(--c-brand);
		color: var(--c-on-brand);
		border-color: var(--c-brand);
		white-space: nowrap;
	}

	.v2-content .table--matrix tbody th {
		position: sticky;
		left: 0;
		background: var(--c-soft);
		font-weight: 700;
		white-space: nowrap;
	}

	.v2-content .table--matrix tbody tr:nth-child(even) td {
		background: #faf9fb;
	}

	.v2-content .overflow-x-auto {
		scrollbar-width: thin;
		scrollbar-color: var(--c-input-line) transparent;
	}

	.v2-content .table_link a {
		color: var(--c-accent-text);
	}

	/* ===== 手順（P05。STEP の番号を斜めの紫の札、箱を矢羽の形でつなぐ） ===== */
	.v2-content .flow-wrap--service01 .row {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
		gap: var(--sp-3);
	}

	.v2-content .flow-wrap--service01 .box {
		position: relative;
		height: 100%;
		padding: var(--sp-5) var(--sp-6) var(--sp-5) var(--sp-5);
		background: var(--c-soft);
		clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%);
	}

	.v2-content .flow-wrap--service01 .col-1:last-child .box {
		clip-path: none;
		border-radius: 0 var(--radius-md) var(--radius-md) 0;
	}

	.v2-content .flow-wrap--service01 .label {
		display: inline-block;
		padding: 2px 16px;
		background: var(--c-brand);
		color: var(--c-on-brand);
		font-family: var(--f-en);
		font-weight: 600;
		font-size: var(--fs-xs);
		letter-spacing: 0.12em;
		clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
	}

	.v2-content .flow-wrap--service01 .heading {
		margin: var(--sp-3) 0 var(--sp-2);
		font-size: var(--fs-lg);
		font-weight: 700;
		line-height: 1.5;
	}

	.v2-content .flow-wrap--service01 .text {
		font-size: var(--fs-sm);
	}

	@media (max-width: 767px) {
		.v2-content .flow-wrap--service01 .box {
			padding-right: var(--sp-5);
			padding-bottom: calc(var(--sp-5) + 14px);
			clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), 50% 100%, 0 calc(100% - 14px));
		}
	}

	/* ===== よくある質問（P13。Q・A の札） ===== */
	.v2-content .faq-list01 {
		margin: var(--sp-5) 0;
		border-top: 1px solid var(--c-line);
	}

	.v2-content .faq-list01 dt,
	.v2-content .faq-list01 dd {
		display: flex;
		gap: var(--sp-3);
		margin: 0;
		padding: var(--sp-4) 0;
	}

	.v2-content .faq-list01 dt {
		padding-bottom: var(--sp-2);
		font-weight: 700;
	}

	.v2-content .faq-list01 dd {
		padding-top: 0;
		border-bottom: 1px solid var(--c-line);
		color: var(--c-ink-sub);
	}

	.v2-content .faq-list01 .mark {
		flex: none;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 34px;
		height: 28px;
		font-family: var(--f-en);
		font-weight: 600;
		clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
	}

	.v2-content .faq-list01 dt .mark {
		background: var(--c-brand);
		color: var(--c-on-brand);
	}

	.v2-content .faq-list01 dd .mark {
		background: var(--c-soft-2);
		color: var(--c-ink);
	}

	/* ===== ボタン ===== */
	.v2-content .btn-section01 .row {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
		gap: var(--sp-3);
	}

	.v2-content .link-btn--arrow02,
	.v2-content .link-btn02 {
		display: inline-flex;
		align-items: center;
		justify-content: space-between;
		gap: var(--sp-4);
		min-height: 56px;
		padding: 0 6px 0 var(--sp-6);
		border: 1px solid var(--c-line-strong);
		border-radius: var(--radius-pill);
		background: var(--c-bg);
		color: var(--c-ink);
		font-weight: 700;
		text-decoration: none;
		transition: transform var(--dur-fast), box-shadow var(--dur-fast);
	}

	.v2-content .btn-section01 .link-btn--arrow02 {
		display: flex;
	}

	.v2-content .link-btn02 {
		padding-right: var(--sp-6);
		border-color: var(--c-brand);
		background: var(--c-brand);
		color: var(--c-on-brand);
	}

	.v2-content .link-btn--arrow02 .arrow {
		position: relative;
		flex: none;
		width: 44px;
		height: 44px;
		border-radius: 50%;
		background: var(--c-brand);
	}

	.v2-content .link-btn--arrow02 .arrow::before {
		content: "";
		position: absolute;
		left: 50%;
		top: 50%;
		width: 8px;
		height: 8px;
		margin: -4px 0 0 -6px;
		border-top: 2px solid var(--c-on-brand);
		border-right: 2px solid var(--c-on-brand);
		transform: rotate(45deg);
	}

	.v2-content .link-btn--arrow02:hover,
	.v2-content .link-btn02:hover {
		transform: translateY(-2px);
		box-shadow: var(--shadow-lift);
	}

	/* ===== 地図・組織図 ===== */
	.v2-content .map-wrap iframe,
	.v2-content .map-wrap01 iframe {
		width: 100%;
		min-height: 320px;
		border: 0;
		border-radius: var(--radius-md);
	}

	.v2-content .link--map01 {
		color: var(--c-accent-text);
	}

	.v2-content .img-wrap--organization-chart img {
		max-width: 100%;
	}

	/* ===== フォーム（P12。Contact Form 7 の table.table--tr） ===== */
	.v2-content .table--tr {
		margin: 0;
	}

	.v2-content .table--tr th,
	.v2-content .table--tr td {
		border: 0;
		border-bottom: 1px solid var(--c-line);
		padding: var(--sp-5) var(--sp-4);
		vertical-align: top;
	}

	.v2-content .table--tr th {
		width: 30%;
		font-weight: 700;
	}

	.v2-content .table--tr p {
		margin: 0;
	}

	@media (max-width: 767px) {
		.v2-content .table--tr th,
		.v2-content .table--tr td {
			display: block;
			width: auto;
			padding-inline: 0;
		}

		.v2-content .table--tr th {
			padding-bottom: var(--sp-2);
			border-bottom: 0;
		}

		.v2-content .table--tr td {
			padding-top: 0;
		}
	}

	/* 必須の札は赤ではなく紫 */
	.v2-content .required {
		display: inline-block;
		margin-left: var(--sp-2);
		padding: 0 8px;
		background: var(--c-brand);
		color: var(--c-on-brand);
		font-size: var(--fs-xs);
		font-weight: 700;
		line-height: 1.8;
		vertical-align: 0.1em;
		clip-path: polygon(5px 0, 100% 0, calc(100% - 5px) 100%, 0 100%);
	}

	.v2-content .wpcf7-form-control-wrap {
		display: block;
	}

	.v2-content input[type="text"],
	.v2-content input[type="email"],
	.v2-content input[type="tel"],
	.v2-content input[type="url"],
	.v2-content input[type="number"],
	.v2-content input[type="date"],
	.v2-content select,
	.v2-content textarea {
		width: 100%;
		min-height: 48px;
		padding: 0.6em 0.9em;
		border: 1px solid var(--c-input-line);
		border-radius: var(--radius-md);
		background: var(--c-bg);
		font-size: var(--fs-md);
		line-height: 1.6;
	}

	.v2-content textarea {
		min-height: 180px;
		resize: vertical;
	}

	.v2-content input:focus-visible,
	.v2-content select:focus-visible,
	.v2-content textarea:focus-visible {
		outline: 3px solid var(--c-focus);
		outline-offset: 1px;
		border-color: var(--c-brand);
	}

	.v2-content ::placeholder {
		color: #8a8292;
	}

	.v2-content .check-wrap--privacy {
		margin-top: var(--sp-6);
		text-align: center;
	}

	.v2-content .wpcf7-list-item {
		margin: 0;
	}

	.v2-content .wpcf7-list-item label {
		display: inline-flex;
		align-items: center;
		gap: var(--sp-2);
		min-height: 44px;
		cursor: pointer;
	}

	.v2-content input[type="checkbox"],
	.v2-content input[type="radio"] {
		width: 20px;
		height: 20px;
		accent-color: var(--c-brand);
	}

	.v2-content .wpcf7-submit,
	.v2-content .wpcf7-previous {
		display: block;
		min-width: 280px;
		min-height: 56px;
		margin: var(--sp-6) auto 0;
		padding: 0 var(--sp-7);
		border: 2px solid var(--c-brand);
		border-radius: var(--radius-pill);
		background: var(--c-brand);
		color: var(--c-on-brand);
		font-weight: 700;
		font-size: var(--fs-md);
		cursor: pointer;
		transition: transform var(--dur-fast), box-shadow var(--dur-fast);
	}

	.v2-content .wpcf7-previous {
		background: var(--c-bg);
		color: var(--c-ink);
	}

	.v2-content .wpcf7-submit:hover,
	.v2-content .wpcf7-previous:hover {
		transform: translateY(-2px);
		box-shadow: var(--shadow-lift);
	}

	.v2-content .wpcf7-submit:disabled {
		opacity: 0.5;
		cursor: not-allowed;
		transform: none;
		box-shadow: none;
	}
}

/*
 * ここから @layer の外。Contact Form 7 の CSS（@layer の外）より強くしたい誤りの表示だけ。
 * 誤りは欄の下に文で、色だけに頼らない（文頭に「！」の印）。
 */
.v2-content .wpcf7-not-valid-tip {
	display: block;
	margin-top: 6px;
	color: var(--c-error);
	font-size: var(--fs-sm);
	font-weight: 700;
}

.v2-content .wpcf7-not-valid-tip::before {
	content: "！";
}

.v2-content .wpcf7-form-control.wpcf7-not-valid {
	border-color: var(--c-error);
	background: var(--c-error-soft);
}

.v2-content .wpcf7 form .wpcf7-response-output {
	margin: var(--sp-6) 0 0;
	padding: var(--sp-4) var(--sp-5);
	border: 0;
	border-radius: var(--radius-md);
	background: var(--c-soft);
	font-weight: 700;
}

.v2-content .wpcf7 form.invalid .wpcf7-response-output,
.v2-content .wpcf7 form.unaccepted .wpcf7-response-output,
.v2-content .wpcf7 form.failed .wpcf7-response-output {
	background: var(--c-error-soft);
	color: var(--c-error);
}
