@charset "utf-8";

/* =========================================================
   Network Textbook / Knowledge Theme
   - common.css を読み込んだ後に読み込む
   - 既存サイト共通 header / footer の色調を knowledge 用に上書き
========================================================= */


/* =========================================================
   01. Base
========================================================= */

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	background: #17100a;
	color: #302015;
	line-height: 1.75;
}


/* =========================================================
   02. Book Layout
========================================================= */

.book {
	width: 900px;
	margin: 24px auto;
	padding: 24px;
	position: relative;
	background:
		radial-gradient(circle at center, rgba(90, 55, 25, .25), transparent 55%),
		linear-gradient(90deg, #1b1009, #2a180d 12%, #2b190e 88%, #120905);
	border: 2px solid #5a361b;
	box-shadow:
		0 0 0 8px #1a0d06 inset,
		0 20px 45px rgba(0, 0, 0, .75);
}

.book::before {
	content: "";
	position: absolute;
	inset: 12px;
	border: 1px solid rgba(185, 130, 55, .28);
	pointer-events: none;
}


/* =========================================================
   03. Knowledge Inner Header
========================================================= */

.site-header {
	position: relative;
	z-index: 2;
	min-height: 84px;
	padding: 18px 24px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	color: #d9b76d;
	background: linear-gradient(#2b1a10, #1b0e07);
	border: 1px solid rgba(188, 139, 65, .35);
}

.brand {
	display: flex;
	align-items: center;
	gap: 12px;
}

.brand-mark img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.brand-title {
	font-size: 21px;
	font-weight: bold;
	letter-spacing: .08em;
}

.brand-sub {
	font-size: 12px;
	color: #b99255;
}

.lead {
	font-size: 15px;
	font-weight: bold;
}


/* =========================================================
   04. Paper Area
========================================================= */

.paper {
	position: relative;
	z-index: 2;
	margin: 22px auto 0;
	padding: 42px 42px 34px;
	background:
		radial-gradient(circle at center, rgba(255, 243, 205, .82), rgba(224, 181, 103, .72) 65%, rgba(125, 74, 28, .55)),
		linear-gradient(#ead09b, #d9ac63);
	border: 1px solid #7c4c21;
	box-shadow:
		0 0 22px rgba(68, 36, 12, .7) inset,
		0 8px 18px rgba(0, 0, 0, .35);
}

.breadcrumb {
	font-size: 12px;
	color: #6b4a2d;
	border-bottom: 1px solid rgba(95, 61, 30, .42);
	padding-bottom: 10px;
	margin-bottom: 20px;
}

.title-area {
	text-align: center;
}

.title-area h1 {
	font-size: 40px;
	letter-spacing: .08em;
	line-height: 1.25;
}

.title-area h2 {
	line-height: 1.4;
}

.title-divider {
	margin: 18px auto 22px;
	text-align: center;
}

.title-divider img {
	width: 160px;
	max-width: 80%;
	height: auto;
	opacity: .6;
}

.subtitle {
	font-weight: bold;
}

.compass {
	position: absolute;
	right: 20px;
	bottom: 20px;
	width: 140px;
	height: auto;
	opacity: .15;
	pointer-events: none;
}


/* =========================================================
   05. Knowledge Menu
========================================================= */

.knowledge-category {
	margin-bottom: 28px;
}

.knowledge-category h3 {
	margin-bottom: 10px;
}

.knowledge-list {
	padding-left: 1.4em;
}

.knowledge-list li {
	line-height: 1.9;
}

.knowledge-list a {
	color: #7a4a1f;
	font-weight: 600;
	text-decoration: none;
	border-bottom: 1px solid rgba(122, 74, 31, .4);
}

.knowledge-list a:hover {
	color: #5a3312;
	background: rgba(201, 168, 95, .15);
	padding: 2px 4px;
	border-radius: 2px;
}


/* =========================================================
   06. Article Parts
   ※ contents ページ用の共通部品
========================================================= */

.diagram {
	margin: 28px 0 20px;
	padding: 0;
	background: none;
	border: none;
	box-shadow: none;
}

.diagram img {
	display: block;
	width: 100%;
	height: auto;
}

.text-block {
	padding-bottom: 24px;
	border-bottom: 1px solid rgba(81, 50, 25, .35);
	font-weight: bold;
	font-size: 14px;
}

.section {
	padding: 22px 0;
	border-bottom: 1px solid rgba(81, 50, 25, .35);
}

.section h2,
.summary h2 {
	font-size: 20px;
	margin-bottom: 16px;
}

.cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 22px;
}

.card {
	display: grid;
	grid-template-columns: 42px 1fr;
	column-gap: 10px;
	align-items: start;
}

.icon {
	font-size: 34px;
	line-height: 1;
	color: #4b2d17;
}

.card h3 {
	font-size: 14px;
	margin-bottom: 5px;
}

.card p {
	grid-column: 2;
	font-size: 12px;
	font-weight: bold;
}

.trouble {
	display: grid;
	grid-template-columns: 190px 1fr;
	gap: 8px 18px;
	font-size: 14px;
}

.trouble dt {
	font-weight: bold;
}

.trouble dt::before {
	content: "▲ ";
}

.trouble dd {
	font-weight: bold;
}

.summary {
	position: relative;
	margin-top: 24px;
	padding: 20px 24px;
	width: 70%;
	min-height: 112px;
	background: rgba(255, 255, 255, .18);
	border: 1px solid rgba(92, 58, 28, .28);
	box-shadow: 0 3px 10px rgba(81, 45, 18, .12);
}

.summary ul {
	list-style: none;
	position: relative;
	z-index: 2;
}

.summary li {
	margin: 6px 0;
	font-weight: bold;
}

.summary li::before {
	content: "✓ ";
}


/* =========================================================
   07. Knowledge CTA
========================================================= */

.cta {
	position: relative;
	z-index: 2;
	padding: 28px 30px;
	display: grid;
	grid-template-columns: 90px 1fr auto;
	gap: 24px;
	align-items: center;
	color: #e0bd72;
	background: linear-gradient(#2b160b, #170b05);
	border: 1px solid rgba(190, 139, 62, .45);
}

.cta::before {
	content: "";
	position: absolute;
	inset: 8px;
	border: 1px solid rgba(207, 154, 65, .42);
	pointer-events: none;
}

.cta h2 {
	font-size: 18px;
	margin-bottom: 5px;
}

.cta p,
.cta li {
	font-size: 13px;
	font-weight: bold;
}

.cta ul {
	display: flex;
	gap: 16px;
	list-style: none;
	margin-top: 6px;
}

.cta li::before {
	content: "✓ ";
}

.btn {
	color: #e7c783;
	border: 1px solid rgba(221, 170, 78, .7);
	text-decoration: none;
	padding: 11px 18px;
	background: rgba(0, 0, 0, .2);
	font-weight: bold;
	font-size: 13px;
}

.crest {
	width: 72px;
	height: 72px;
	display: grid;
	place-items: center;
	color: #d8ad58;
	font-size: 36px;
	border: 1px solid #b88635;
}


/* =========================================================
   08. Knowledge Inner Footer
   ※ 本物の footer ではなく、book 内の section.footer
========================================================= */

.footer {
	position: relative;
	z-index: 2;
	padding: 20px 24px 10px;
	text-align: center;
	color: #d8b36a;
}

.footer nav {
	display: flex;
	justify-content: center;
	gap: 16px;
	margin-bottom: 8px;
}

.footer p {
	font-size: 12px;
}

.footer a {
	color: #d8b36a;
	text-decoration: none;
	font-size: 13px;
	font-weight: bold;
}

.footer-crest {
	position: relative;
	left: 10px;
	margin-bottom: 12px;
}

.footer-crest img {
	width: 70px;
	height: auto;
	opacity: .3;
}

.footer::after {
	content: "";
	position: absolute;
	right: 16px;
	bottom: -10px;
	width: 80px;
	height: 80px;
	background: url("../img/bg_quill.png") no-repeat center / contain;
	opacity: .4;
	pointer-events: none;
}


/* =========================================================
   09. Site Header Override
   ※ common.css の header を knowledge 色に変更
========================================================= */

body > header {
	margin-top: 0;
	padding-top: 22px;
	background:
		radial-gradient(circle at center top, rgba(210, 160, 70, .18), transparent 45%),
		linear-gradient(#24150c, #120905);
	border-bottom: 1px solid rgba(190, 139, 62, .45);
}

body > header #mainLogo a {
	color: #e0bd72;
}

body > header #mainLogo::before {
	background-color: rgba(224, 189, 114, .35);
}

body > header #mainLogo a::after {
	background-color: #d8b36a;
}

body > header #globalNav {
	margin-top: 1.4em;
	background: linear-gradient(#3a2414, #201007);
	border-top: 1px solid rgba(190, 139, 62, .35);
	border-bottom: 1px solid rgba(190, 139, 62, .45);
}

body > header #globalNav .navList a.naviLink {
	color: #e0bd72;
}

body > header #globalNav .navList a.naviLink::after,
body > header #globalNav .navList a.activePage::after {
	background-color: #e0bd72;
}


/* =========================================================
   10. Site Footer Override
   ※ common.css の footer を knowledge 色に変更
========================================================= */

body > footer {
	background: linear-gradient(#2a1a0f, #140a05);
	border-top: 1px solid rgba(190, 139, 62, .4);
}

body > footer,
body > footer * {
	color: #c9a85f;
}

body > footer a,
body > footer .navList a.naviLink {
	color: #e0bd72;
}

body > footer a:hover {
	color: #f0d28a;
}

body > footer .navList a.naviLink::after {
	background-color: #e0bd72;
}

body > footer .copyright {
	color: #c9a85f;
}

body > footer .footer-area-map {
	background: linear-gradient(#1a0f08, #0e0603);
	border-top: 1px solid rgba(190, 139, 62, .3);
}

body > footer .footer-area-title {
	color: #e0bd72;
}

body > footer .footer-area-text,
body > footer .footer-area-note {
	color: #c9a85f;
}

body > footer .area-pref {
	color: #c9a85f !important;
	font-weight: bold;
}

body > footer .footer-cta a {
	color: #e0bd72;
	background: linear-gradient(#3a2414, #201007);
	border: 1px solid rgba(224, 189, 114, .6);
}

body > footer .sns-icon {
	opacity: 1;
	filter: sepia(1) saturate(1.8) hue-rotate(350deg) brightness(1.15);
}

body > footer .sns-icon.is-disabled {
	opacity: .38;
	filter: sepia(1) saturate(.8) hue-rotate(350deg) brightness(.85);
}

body > footer a:hover .sns-icon {
	opacity: .85;
	filter: sepia(1) saturate(2.2) hue-rotate(350deg) brightness(1.3);
}


/* =========================================================
   11. To Top Button
========================================================= */

footer #toTop {
	color: #e0bd72 !important;
	background: linear-gradient(#3a2414, #1a0e07) !important;
	border: 1px solid rgba(224, 189, 114, .7) !important;
	box-shadow: 0 0 18px rgba(224, 189, 114, .35) !important;
}

footer #toTop span {
	color: #e0bd72 !important;
}

footer #toTop span::before {
	background-color: #e0bd72 !important;
}

footer #toTop::after,
#toTop::after {
	content: none !important;
	display: none !important;
}


/* =========================================================
   12. Responsive
========================================================= */

@media only screen and (max-width: 768px) {

	/* Site Header */
	body > header {
		padding-bottom: 1.5em;
		position: relative;
		z-index: 10000;
	}

	body > header #navTrigger {
		background-color: #2b160b;
		border: 1px solid rgba(224, 189, 114, .7);
		z-index: 10002;
	}

	body > header #navTrigger .hamburgerIcon,
	body > header #navTrigger .triggerWrap::before,
	body > header #navTrigger .triggerWrap::after {
		background-color: #e0bd72;
	}

	body > header #globalNav {
		background:
			radial-gradient(circle at center, rgba(90, 55, 25, .25), transparent 55%),
			linear-gradient(#1b1009, #120905);
			z-index: 10001;
	}

	body > header #globalNav .navList li {
		border-bottom: 1px solid rgba(224, 189, 114, .25);
	}

	body > header #globalNav .navList .navHeader a,
	body > header #globalNav .navList li:nth-child(n+2) a {
		color: #e0bd72;
	}

	body > header #globalNav .navList .navHeader::before {
		background-color: rgba(224, 189, 114, .35);
	}

	body > header #globalNav .navList .navHeader a::after,
	body > header #globalNav .navList li:nth-child(n+2) a::after {
		background-color: #e0bd72;
	}

	body > header #globalNav .navList li.recruitBnr a,
	body > header #globalNav .navList li.contactBnr a {
		color: #e0bd72;
		background-color: transparent;
		border-color: rgba(224, 189, 114, .7);
	}

	body > header #globalNav .navList li.recruitBnr a::before,
	body > header #globalNav .navList li.recruitBnr a::after,
	body > header #globalNav .navList li.contactBnr a::before {
		background-color: #e0bd72;
	}

	body > header #globalNav .navList li.btnClose button {
		color: #e0bd72;
		background-color: rgba(224, 189, 114, .18);
		border: 1px solid rgba(224, 189, 114, .45);
	}

	body > header #globalNav .navList li.btnClose button::after {
		background-color: #e0bd72;
	}

	/* Book */
	#knowledge {
		position: relative;
		z-index: 1;
	}

	#knowledge.book {
		width: calc(100% - 16px);
		margin: 12px auto;
		padding: 10px;
	}

	#knowledge .site-header {
		display: block;
		padding: 18px 14px;
		min-height: auto;
		overflow: hidden;
	}

	#knowledge .brand {
		gap: 12px;
		align-items: center;
	}

	#knowledge .brand-mark {
		width: 64px;
		flex: 0 0 64px;
	}

	#knowledge .brand-title {
		font-size: 24px;
		line-height: 1.35;
		letter-spacing: .04em;
		white-space: normal;
	}

	#knowledge .brand-sub {
		font-size: 13px;
	}

	#knowledge .site-header .lead {
		margin-top: 14px;
		font-size: 14px;
		line-height: 1.7;
		white-space: normal;
	}

	#knowledge .paper {
		padding: 28px 22px;
		overflow: hidden;
	}

	#knowledge .title-area {
		text-align: center;
	}

	#knowledge .title-area h2 {
		font-size: 24px;
		line-height: 1.4;
		white-space: normal;
	}

	#knowledge .title-divider img {
		width: 140px;
		max-width: 70%;
	}

	#knowledge .knowledge-category {
		margin: 0 0 30px;
	}

	#knowledge .knowledge-category h3 {
		font-size: 20px;
		line-height: 1.5;
		margin-bottom: 12px;
	}

	#knowledge .knowledge-list {
		padding-left: 1.2em;
	}

	#knowledge .knowledge-list li {
		font-size: 16px;
		line-height: 1.9;
		margin-bottom: 4px;
		word-break: keep-all;
		overflow-wrap: anywhere;
	}

	#knowledge .compass {
		width: 90px;
		right: 14px;
		bottom: 14px;
	}

	/* CTA */
	#knowledge .cta {
		display: block;
		padding: 24px 18px;
	}

	#knowledge .cta .footer-crest {
		text-align: center;
		left: 0;
	}

	#knowledge .cta ul {
		display: block;
	}

	#knowledge .cta .btn {
		display: block;
		width: fit-content;
		margin: 18px auto 0;
	}

	/* Inner Footer */
	#knowledge .footer .nav {
		flex-wrap: wrap;
		gap: 10px 16px;
	}

	/* Site Footer */
	body > footer {
		background: linear-gradient(#1b1009, #0e0603);
	}

	body > footer .navList li {
		border-bottom: 1px solid rgba(224, 189, 114, .2);
	}

	body > footer .footer-cta a {
		display: block;
		text-align: center;
	}
}

/* パンくずを本文リンクと統一 */
.breadcrumb a {
    color: rgb(122, 74, 31);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(122, 74, 31, 0.4);
}

/* hover */
.breadcrumb a:hover {
    color: #5c4428;
    border-bottom: 1px solid rgba(92, 68, 40, 0.6);
}

/* 現在位置 */
.breadcrumb span {
    color: #5c4428;
}

.knowledge-list {
	list-style: decimal;
	padding-left: 1.8em;
}

.knowledge-list li {
	margin-bottom: 10px;
	line-height: 1.9;
}

/* 番号だけ色を調整 */
.knowledge-list li::marker {
	color: #7a4a1f;
	font-weight: bold;
}

.points {
	display: flex;
	gap: 40px;
	margin-top: 20px;
}

.point {
	display: flex;
	gap: 12px;
	align-items: flex-start;
}

.point .icon {
	font-size: 22px;
	color: #7a4a1f; /* 茶系に統一 */
	min-width: 24px;
	text-align: center;
}

.point h4 {
	margin: 0 0 6px;
	font-size: 16px;
	color: #3a2a1a;
}

.point p {
	margin: 0;
	font-size: 14px;
	line-height: 1.8;
}

/* 共通フッター CTA */
body > footer .footer-cta a {
	color: #e0bd72 !important;
	background: linear-gradient(#3a2414, #201007) !important;
	border: 1px solid rgba(224, 189, 114, .7) !important;
	box-shadow: none !important;
}

body > footer .footer-cta a:hover {
	color: #fff1c2 !important;
	background: linear-gradient(#4a2b16, #241208) !important;
	border-color: rgba(224, 189, 114, .95) !important;
	box-shadow:
		0 0 12px rgba(224, 189, 114, .28),
		0 0 24px rgba(224, 189, 114, .16) !important;
	transform: translateY(-2px);
}

#knowledge .cta .btn,
#knowledge .cta .btn:visited {
	color: #e0bd72 !important;
	background: rgba(0, 0, 0, .2) !important;
	border: 1px solid rgba(224, 189, 114, .7) !important;
}

#knowledge .cta .btn:hover {
	color: #fff1c2 !important;
	background: linear-gradient(#4a2b16, #241208) !important;
	border-color: rgba(224, 189, 114, .95) !important;
	box-shadow:
		0 0 12px rgba(224, 189, 114, .28),
		0 0 24px rgba(224, 189, 114, .16) !important;
}

.paper {
	position: relative;
}

.paper::before {
	content: "";
	position: absolute;
	right: 40px;
	bottom: 40px;
	width: 180px;
	height: 180px;

	background:
		url("../img/bg_compass.png")
		no-repeat center center / contain;

	opacity: .08;
	pointer-events: none;
}

/* =========================
   VBA Menu
========================= */

.vba-menu-list {
	margin: 18px 0 0 1.8em;
	padding-left: 1.2em;
	list-style: decimal;
}

.vba-menu-entry {
	margin-bottom: 12px;
	line-height: 1.9;
	font-weight: 700;
	color: #6b3f19;
}

.vba-menu-entry::marker {
	color: #7a4a1f;
	font-weight: bold;
}

.vba-menu-entry a {
	color: inherit;
	text-decoration: none;
	transition: color .25s ease;
}

.vba-menu-entry a:hover {
	color: #8f5a26;
	text-decoration: underline;
}

@media only screen and (max-width: 768px) {

	.vba-menu-list {
		margin: 14px 0 0 1.4em;
		padding-left: 1em;
	}

	.vba-menu-entry {
		margin-bottom: 10px;
		font-size: 16px;
		line-height: 1.8;
		word-break: keep-all;
		overflow-wrap: anywhere;
	}
}

/* =========================
   Mermaid（共通）
========================= */

.mermaid-diagram {
	text-align: center;
	margin: 40px 0;
}

.mermaid-diagram .mermaid,
.mermaid-zoomable {
	display: block;
	cursor: zoom-in;
}

.mermaid-diagram svg {
	display: block;
	width: 100% !important;
	max-width: 900px;
	height: auto !important;
	margin: 0 auto;
}

/* Mermaid 文字色統一 */
.mermaid text,
.mermaid tspan,
.mermaid .flowchart-label,
.mermaid .flowchart-label text,
.mermaid .flowchart-label tspan,
.mermaid .cluster-label,
.mermaid .cluster-label text,
.mermaid .cluster-label tspan,
.mermaid .nodeLabel,
.mermaid .edgeLabel {
	color: #3a2414 !important;
	fill: #3a2414 !important;
}

/* =========================
   Mermaid 拡大モーダル
========================= */

.mermaid-modal {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(22, 10, 2, .78);
	z-index: 99999;
}

.mermaid-modal.is-open {
	display: flex;
}

.mermaid-modal-inner {
	position: relative;
	width: min(1400px, 96vw);
	max-height: 92vh;
	padding: 40px;
	background: linear-gradient(to bottom, #ead1a2, #e0bf84);
	border: 1px solid rgba(122, 74, 31, .25);
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
	overflow: auto;
}

.mermaid-modal-content {
	display: flex;
	justify-content: center;
	align-items: center;
	min-width: max-content;
	text-align: center;
	cursor: grab;
}

.mermaid-modal-content svg {
	display: block;
	width: auto !important;
	min-width: 900px;
	height: auto !important;
	margin: 0 auto;
}

/* モーダル内 Mermaid 文字色統一 */
.mermaid-modal-content text,
.mermaid-modal-content tspan,
.mermaid-modal-content .flowchart-label,
.mermaid-modal-content .flowchart-label text,
.mermaid-modal-content .flowchart-label tspan,
.mermaid-modal-content .cluster-label,
.mermaid-modal-content .cluster-label text,
.mermaid-modal-content .cluster-label tspan,
.mermaid-modal-content .nodeLabel,
.mermaid-modal-content .edgeLabel {
	color: #3a2414 !important;
	fill: #3a2414 !important;
}

.mermaid-close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 52px;
	height: 52px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: #6b3f19;
	color: #fff;
	font-size: 34px;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
}

@media only screen and (max-width: 768px) {
	.mermaid-diagram svg {
		max-width: 100%;
	}

	.mermaid-modal-inner {
		padding: 28px 18px;
	}

	.mermaid-modal-content svg {
		min-width: 760px;
	}
}

.page-nav {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	margin: 48px 0 8px;
	padding-top: 24px;
	border-top: 1px solid rgba(92, 59, 28, 0.25);
}

.page-nav__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 18px;
	border: 1px solid rgba(92, 59, 28, 0.35);
	border-radius: 999px;
	background: rgba(92, 59, 28, 0.08);
	color: #3a2412;
	text-decoration: none;
	font-weight: 700;
	line-height: 1.5;
}

.page-nav__btn:hover {
	background: rgba(92, 59, 28, 0.18);
	color: #2a1608;
}

.page-nav__btn--next {
	margin-left: auto;
}

@media screen and (max-width: 640px) {
	.page-nav {
		flex-direction: column;
	}

	.page-nav__btn,
	.page-nav__btn--next {
		width: 100%;
		margin-left: 0;
	}
}

@media screen and (max-width: 640px) {

	/* 実務ポイント */
	.cards {
		display: flex;
		flex-direction: column;
		gap: 16px;
	}

	.cards .card {
		width: 100%;
		max-width: 100%;
		box-sizing: border-box;
	}

	/* よくあるトラブル */
	.trouble {
		display: flex;
		flex-direction: column;
		gap: 12px;
	}

	.trouble dt,
	.trouble dd {
		width: 100%;
		margin: 0;
		box-sizing: border-box;
	}

	/* まとめ */
	.summary {
		width: 100%;
		max-width: 100%;
		padding: 24px 20px;
		box-sizing: border-box;
	}
}