/**
 * Single post ("コラム詳細ページ") design, based on the client-supplied
 * design file. Loaded only on is_single() for the 'post' post type.
 *
 * @package astra-child
 */

/* Astra's "Narrow Container" site setting caps .ast-container at 750px,
   leaving no room for the article + sidebar two-column layout below.
   Widen it back out on single posts only. */
body.single-post.ast-narrow-container .ast-container {
	max-width: none;
	width: 100%;
}

/* Astra also gives #primary its own 4em top/bottom margin and
   .ast-container its own 20px left/right padding by default (desktop).
   Our layout (.gh-breadcrumb, .gh-article-wrap) already supplies its own
   spacing everywhere it's needed, so Astra's was only adding an extra,
   unwanted gap above the breadcrumb bar and inset on its left/right. */
body.single-post #primary {
	margin-top: 0;
	margin-bottom: 0;
	padding-top: 0;
	padding-bottom: 0;
}
body.single-post .ast-container {
	padding-left: 0;
	padding-right: 0;
}

.gh-article-page {
	--gh-orange: #f39800;
	--gh-orange-d: #d97f00;
	--gh-orange-l: #fdf3e3;
	--gh-yellow: #f5c518;
	--gh-blue: #4a90d9;
	--gh-blue-d: #2f72b8;
	--gh-ink: #333333;
	--gh-sub: #777777;
	--gh-line: #e6e6e6;
	--gh-ghost: #ededed;
	--gh-cream: #fdf8ec;
	--gh-gray: #f7f7f7;

	background: #fff;
	color: var(--gh-ink);
	font-family: "Noto Sans JP", sans-serif;
}
/* Same rotating category-color palette as the blog listing (css/blog-cards.css
   .gh-c0..gh-c5), so a category's chip color here matches its color there. */
.gh-article-page .gh-c0 { --accent: #f19f4d; }
.gh-article-page .gh-c1 { --accent: #f9cf00; }
.gh-article-page .gh-c2 { --accent: #4484ce; }
.gh-article-page .gh-c3 { --accent: #4caf7d; }
.gh-article-page .gh-c4 { --accent: #d9647f; }
.gh-article-page .gh-c5 { --accent: #8a63d2; }
.gh-article-page * {
	box-sizing: border-box;
}
.gh-article-page img {
	display: block;
	max-width: 100%;
}
.gh-article-page a {
	color: var(--gh-blue-d);
	text-underline-offset: 4px;
}
.gh-article-page a:hover {
	color: var(--gh-orange-d);
}

/* Breadcrumb
--------------------------------------------- */
.gh-breadcrumb-bar {
	background: var(--gh-gray);
	border-bottom: 1px solid var(--gh-line);
}
.gh-breadcrumb {
	max-width: 1180px;
	margin: 0 auto;
	padding: 9px clamp(16px, 4vw, 32px);
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	font-size: 12px;
	line-height: 1.8;
	color: var(--gh-sub);
	letter-spacing: .5px;
}
.gh-breadcrumb a {
	color: var(--gh-sub);
	text-decoration: none;
}
.gh-breadcrumb .current {
	color: var(--gh-ink);
}

/* Layout
--------------------------------------------- */
.gh-article-wrap {
	max-width: 1180px;
	margin: 0 auto;
	padding: clamp(24px, 4vw, 44px) clamp(16px, 4vw, 32px) 60px;
	display: flex;
	flex-wrap: wrap;
	gap: clamp(28px, 4vw, 56px);
	align-items: flex-start;
}
.gh-article {
	flex: 1 1 520px;
	min-width: 0;
}

/* Chips / title / meta
--------------------------------------------- */
.gh-chips {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}
.gh-chip-cat,
.gh-chip-tag {
	display: inline-flex;
	align-items: center;
	height: 26px;
	padding: 0 14px;
	border-radius: 3px;
	font-size: 12px;
	letter-spacing: 1px;
	text-decoration: none;
}
a.gh-chip-cat {
	background: var(--accent, var(--gh-orange));
	color: #fff;
	font-weight: 700;
}
a.gh-chip-cat.gh-c1 {
	/* #F9CF00 is too bright for white text to read well. */
	color: #3a2f0d;
}
a.gh-chip-tag {
	border: 1px solid var(--gh-line);
	color: var(--gh-sub);
	font-weight: 500;
}

.gh-article-title {
	font-size: clamp(24px, 3.4vw, 34px);
	font-weight: 700;
	line-height: 1.65;
	letter-spacing: 2px;
	margin: 0 0 16px;
	color: var(--gh-ink);
}

.gh-article-meta {
	display: flex;
	align-items: center;
	gap: 18px;
	flex-wrap: wrap;
	font-size: 12px;
	color: var(--gh-sub);
	letter-spacing: 1px;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--gh-line);
	margin-bottom: 22px;
}
/* Hero
--------------------------------------------- */
.gh-article-hero {
	margin: 0 0 30px;
}
.gh-article-hero img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 6px;
}

/* Table of contents
--------------------------------------------- */
.gh-toc {
	background: var(--gh-cream);
	border: 1px solid #f0e3c8;
	border-radius: 6px;
	padding: 22px 26px;
	margin: 0 0 40px;
}
.gh-toc-head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}
.gh-toc-head .bar {
	width: 4px;
	height: 18px;
	background: var(--gh-orange);
	display: inline-block;
	flex: none;
}
.gh-toc-head .label {
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 2px;
}
.gh-toc ol {
	margin: 0;
	padding-left: 1.4em;
	font-size: 14px;
	line-height: 2.1;
	color: var(--gh-ink);
}
.gh-toc ol ul {
	margin: 0;
	padding-left: 1em;
	list-style: none;
	color: var(--gh-sub);
	font-size: 13px;
}
.gh-toc a {
	text-decoration: none;
}

/* Article body — base heading styles (H2–H6)
--------------------------------------------- */
.gh-article-body {
	font-size: 16px;
	line-height: 2.15em;
	letter-spacing: 1px;
	color: var(--gh-ink);
	counter-reset: gh-num-heading gh-step-heading;
}
.gh-article-body > *:first-child {
	margin-top: 0;
}
.gh-article-body p {
	margin: 0 0 26px;
}
/* :not([class*="is-style-gh-h-"]) on each of these: without it, the
   automatic look and a chosen block style variation (blocks.css) would
   both match the same h2/h3/h4 and stack (e.g. H2's left bar surviving
   underneath the "角丸枠線" pill border). Excluding styled headings here
   means a variation's own rules are the only thing that applies to them. */
.gh-article-body h2:not([class*="is-style-gh-h-"]) {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	font-size: clamp(20px, 2.4vw, 25px);
	font-weight: 700;
	line-height: 1.7;
	letter-spacing: 2px;
	margin: 48px 0 22px;
	padding-bottom: 14px;
	border-bottom: 2px solid var(--gh-line);
}
.gh-article-body h2:not([class*="is-style-gh-h-"])::before {
	content: "";
	width: 6px;
	min-height: 1.7em;
	background: var(--gh-orange);
	display: inline-block;
	flex: none;
}
.gh-article-body h3:not([class*="is-style-gh-h-"]) {
	font-size: clamp(18px, 2vw, 21px);
	font-weight: 700;
	letter-spacing: 2px;
	line-height: 1.7;
	margin: 34px 0 18px;
	border-bottom: 2px solid var(--gh-orange);
	display: table;
	padding-bottom: 6px;
}
.gh-article-body h4:not([class*="is-style-gh-h-"]) {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: clamp(16px, 1.8vw, 18px);
	font-weight: 700;
	letter-spacing: 2px;
	margin: 28px 0 14px;
}
.gh-article-body h4:not([class*="is-style-gh-h-"])::before {
	content: "";
	width: 10px;
	height: 10px;
	background: var(--gh-yellow);
	border-radius: 2px;
	display: inline-block;
	flex: none;
}
.gh-article-body h5 {
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 2px;
	line-height: 1.6;
	color: var(--gh-blue-d);
	margin: 28px 0 6px;
}
.gh-article-body h6 {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 3px;
	text-transform: uppercase;
	color: var(--gh-orange);
	margin: 40px 0 8px;
}

/* Heading style variations (01–18, and the "基準：Hx" ones) now live in
   css/blocks.css, unscoped, so they also work on pages — only the
   automatic per-level look above is column-page-only. */

/* Table / blockquote
--------------------------------------------- */
.gh-article-body .wp-block-table {
	overflow-x: auto;
	margin: 0 0 34px;
	border: 1px solid var(--gh-line);
	border-radius: 6px;
}
.gh-article-body table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	line-height: 1.9;
	border: none;
	margin: 0;
}
.gh-article-body thead {
	border-bottom: none;
}
.gh-article-body thead tr {
	background: #8c9aa5;
	color: #fff;
}
.gh-article-body th,
.gh-article-body td {
	border: none;
}
.gh-article-body th {
	text-align: left;
	padding: 11px 16px;
	font-weight: 600;
	letter-spacing: 1px;
}
.gh-article-body td {
	padding: 11px 16px;
	border-top: 1px solid var(--gh-line);
}
.gh-article-body tbody tr:first-child td {
	border-top: none;
}
.gh-article-body tbody tr:nth-child(even) {
	background: #fcfcfc;
}
.gh-article-body blockquote {
	margin: 0 0 34px;
	padding: 24px 28px;
	background: var(--gh-cream);
	border-radius: 6px;
}
.gh-article-body blockquote p {
	margin: 0 0 8px;
	font-size: clamp(15px, 1.8vw, 17px);
	font-weight: 500;
	line-height: 1.95;
}
.gh-article-body blockquote cite {
	font-style: normal;
	font-size: 12px;
	color: var(--gh-sub);
	letter-spacing: 1px;
}

/* CTA box
--------------------------------------------- */
.gh-cta-box {
	background: linear-gradient(135deg, #fdf3e3, #fdf8ec);
	border-radius: 8px;
	padding: clamp(24px, 3.5vw, 38px);
	margin: 0 0 44px;
	text-align: center;
}
.gh-cta-box .eyebrow {
	margin: 0 0 6px;
	font-size: 12px;
	letter-spacing: 3px;
	color: var(--gh-orange);
	font-weight: 700;
}
.gh-cta-box h2 {
	font-size: clamp(19px, 2.4vw, 24px);
	font-weight: 700;
	letter-spacing: 2px;
	line-height: 1.75;
	margin: 0 0 12px;
}
.gh-cta-box p {
	margin: 0 0 22px;
	font-size: 14px;
	line-height: 2;
	color: #555;
}
.gh-cta-box .btn {
	display: inline-flex;
	align-items: center;
	height: 52px;
	padding: 0 40px;
	border-radius: 26px;
	background: var(--gh-orange);
	color: #fff;
	text-decoration: none;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 2px;
	box-shadow: 0 4px 12px rgba(243, 152, 0, .3);
}
.gh-cta-box .btn:hover {
	background: var(--gh-orange-d);
	color: #fff;
}

/* Prev / next
--------------------------------------------- */
.gh-prevnext {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin: 0 0 20px;
}
.gh-prevnext a {
	flex: 1 1 240px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 16px 20px;
	border: 1px solid var(--gh-line);
	border-radius: 6px;
	text-decoration: none;
	color: var(--gh-ink);
}
.gh-prevnext a:hover {
	border-color: var(--gh-orange);
	color: var(--gh-ink);
}
.gh-prevnext .gh-next {
	text-align: right;
}
.gh-prevnext .label {
	font-size: 11px;
	letter-spacing: 2px;
	color: var(--gh-sub);
}
.gh-prevnext .title {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.8;
}

/* Sidebar
--------------------------------------------- */
.gh-article-aside {
	flex: 0 1 300px;
	min-width: 260px;
	position: sticky;
	top: 78px;
}
@media (max-width: 900px) {
	.gh-article-aside {
		flex-basis: 100%;
		min-width: 0;
		position: static;
	}
}
.gh-aside-block {
	margin-bottom: 34px;
}
.gh-aside-head {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin-bottom: 14px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--gh-line);
}
.gh-aside-head .ja {
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 2px;
}
.gh-aside-head .en {
	font-size: 11px;
	letter-spacing: 2px;
	color: var(--gh-ghost);
	font-weight: 700;
}
.gh-related-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.gh-related-list a {
	display: flex;
	gap: 12px;
	text-decoration: none;
	color: var(--gh-ink);
}
.gh-related-thumb {
	width: 88px;
	height: 64px;
	flex: none;
	border-radius: 4px;
	object-fit: cover;
	background: var(--gh-gray);
}
.gh-related-text {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}
.gh-related-cat {
	font-size: 10px;
	color: var(--gh-orange);
	font-weight: 700;
	letter-spacing: 1px;
}
.gh-related-title {
	font-size: 13px;
	font-weight: 600;
	line-height: 1.7;
}

.gh-newsletter-box {
	background: var(--gh-cream);
	border-radius: 6px;
	padding: 22px;
	text-align: center;
}
.gh-newsletter-box .eyebrow {
	margin: 0 0 4px;
	font-size: 10px;
	letter-spacing: 2px;
	color: var(--gh-orange);
	font-weight: 700;
}
.gh-newsletter-box .headline {
	margin: 0 0 14px;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.9;
}
.gh-newsletter-box .headline .gh-nowrap {
	white-space: nowrap;
}
.gh-newsletter-box .btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 44px;
	border-radius: 22px;
	background: var(--gh-blue);
	color: #fff;
	text-decoration: none;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 1px;
}
.gh-newsletter-box .btn:hover {
	background: var(--gh-blue-d);
	color: #fff;
}

/* Supervisor block (from the posts page's own block-editor content) — same
   as the one at the bottom of the blog listing (css/blog-cards.css). */
.gh-supervisor {
	margin-top: 48px;
	padding-top: 32px;
	border-top: 1px solid var(--gh-line);
}
