:root {
	--site-header-height: 76px;
	--site-max-width: 1020px;
	--content-max-width: 860px;
	--site-bg: #f7e8f5;
	--site-panel: #fffefb;
	--site-sidebar: #e3ecee;
	--site-sidebar-heading: #dfe9cf;
	--site-link-bg: #b5c6b0;
	--site-link-hover: #83977f;
	--site-border: #6f6a67;
	--site-border-soft: #b8b4ad;
	--site-text: #202020;
	--site-muted: #666;
	--site-accent: #5d6f5d;
	--site-radius: 2px;
	--gap: 10px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	min-width: 0;
	color: var(--site-text);
	background: var(--site-bg);
	font-family: "Yu Gothic", "Yu Gothic UI", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
	font-size: 14px;
	line-height: 1.55;
}

body * {
	min-width: 0;
	overflow-wrap: anywhere;
}

img,
svg,
video,
iframe {
	max-width: 100%;
	height: auto;
}

a {
	color: #03a;
	text-decoration: none;
}

a:visited {
	color: #03a;
}

a:hover,
a:focus {
	color: #b00000;
	text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
	outline: 2px solid #334f7a;
	outline-offset: 2px;
}

:where(header, main, aside, section, article, footer, div, h1, h2, h3, h4, h5, h6)[id] {
	scroll-margin-top: calc(var(--site-header-height) + 18px);
}

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

.skip-link {
	position: fixed;
	top: 8px;
	left: 8px;
	z-index: 2000;
	padding: 6px 10px;
	border: 1px solid var(--site-border);
	background: #fff;
	color: var(--site-text);
	transform: translateY(-150%);
}

.skip-link:focus {
	transform: translateY(0);
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: #fff8fc;
	border-bottom: 1px solid var(--site-border-soft);
}

body.admin-bar .site-header {
	top: 32px;
}

.site-header__inner {
	max-width: var(--site-max-width);
	margin: 0 auto;
	padding: 7px 10px 8px;
	text-align: center;
}

.site-branding {
	display: grid;
	justify-items: center;
	gap: 2px;
}

.custom-logo-link,
.site-logo-link,
.site-title-link {
	display: inline-block;
	max-width: min(100%, 420px);
}

.custom-logo,
.site-logo-image {
	display: block;
	width: auto;
	max-width: 100%;
	max-height: 62px;
	object-fit: contain;
}

.site-title-link {
	color: var(--site-text);
	font-size: 1.2rem;
	font-weight: 700;
}

.site-branding__summary {
	margin: 0;
	color: #5f5f5f;
	font-size: 0.78rem;
	line-height: 1.35;
}

.site-layout {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr) 205px;
	grid-template-areas: "left main right";
	gap: 7px;
	max-width: var(--site-max-width);
	margin: 0 auto;
	padding: 9px 10px 20px;
}

.site-pane,
.site-main > * {
	min-width: 0;
}

.site-pane--left {
	grid-area: left;
}

.site-pane--right {
	grid-area: right;
}

.site-main {
	grid-area: main;
	display: grid;
	gap: var(--gap);
}

.page-shell {
	max-width: var(--content-max-width);
	margin: 0 auto;
	padding: 12px 10px 24px;
}

.page-header,
.content-panel,
.content-card,
.link-category,
.ai-list-item,
.detail-section,
.section-nav,
.breadcrumb,
.comments-area {
	border: 1px solid var(--site-border-soft);
	border-radius: var(--site-radius);
	background: var(--site-panel);
}

.page-header,
.content-panel {
	padding: 10px 12px 12px;
}

.content-card,
.link-category,
.ai-list-item,
.detail-section,
.section-nav,
.breadcrumb {
	padding: 9px 10px;
}

.page-header {
	margin-bottom: var(--gap);
	border-bottom-style: dashed;
}

.page-header h1,
.content-panel__header h1,
.content-panel__header h2,
.link-category h2,
.detail-section h2,
.ai-list-item h2,
.comments-area h2 {
	margin: 0 0 6px;
	padding-left: 6px;
	border-left: 3px solid var(--site-accent);
	color: var(--site-muted);
	font-size: 1.08rem;
	line-height: 1.35;
}

.link-subcategory h3 {
	margin: 10px 0 6px;
	padding-bottom: 3px;
	border-bottom: 1px dashed var(--site-border-soft);
	color: var(--site-muted);
	font-size: 0.96rem;
}

.panel-kicker,
.status-tag {
	display: inline-block;
	margin: 0 0 3px;
	color: #707070;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.pane-disclosure {
	border: 0;
	background: transparent;
}

.pane-disclosure > summary {
	display: none;
	padding: 7px 9px;
	border: 1px solid var(--site-border-soft);
	border-radius: var(--site-radius);
	background: var(--site-sidebar-heading);
	cursor: pointer;
	font-weight: 700;
}

.pane-disclosure__body,
.content-stack,
.ai-list {
	display: grid;
	gap: 8px;
}

.sidebar-section {
	padding: 6px;
	border: 1px solid var(--site-border-soft);
	border-radius: var(--site-radius);
	background: var(--site-sidebar);
}

.sidebar-title {
	margin: 0 0 5px;
	padding: 2px 5px;
	border-bottom: 1px solid #9ca894;
	background: var(--site-sidebar-heading);
	color: var(--site-muted);
	font-size: 0.86rem;
	letter-spacing: 0.14em;
}

.sidebar-links,
.section-nav ul,
.link-list,
.ai-list,
.history-list,
.breadcrumb ol,
.comment-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.sidebar-links {
	display: grid;
	gap: 2px;
}

.sidebar-links a,
.sidebar-links .sidebar-text {
	display: block;
	padding: 3px 6px;
	border: 1px solid #7b8c79;
	background: var(--site-link-bg);
	color: #111;
	line-height: 1.34;
	text-decoration: none;
}

.sidebar-links .sidebar-text {
	background: #edf2e8;
	color: #555;
}

.section-nav {
	margin-bottom: var(--gap);
}

.section-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.section-nav a {
	display: inline-block;
	padding: 3px 7px;
	border: 1px solid #7b8c79;
	background: #edf2e8;
	color: #111;
}

.search-form,
.wp-block-search__inside-wrapper {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 6px;
	align-items: stretch;
}

.search-field,
.wp-block-search__input,
.search-submit,
.wp-block-search__button {
	min-height: 36px;
	box-sizing: border-box;
	font: inherit;
}

.search-field,
.wp-block-search__input {
	width: 100%;
	min-width: 0;
	padding: 5px 7px;
	border: 1px solid var(--site-border);
	border-radius: 2px;
	background: #fff;
}

.search-submit,
.wp-block-search__button {
	width: auto;
	min-width: 54px;
	padding: 5px 9px;
	border: 1px solid var(--site-border);
	border-radius: 2px;
	background: #d8dfd0;
	color: var(--site-text);
	white-space: nowrap;
	cursor: pointer;
}

.search-submit:hover,
.search-submit:focus,
.wp-block-search__button:hover,
.wp-block-search__button:focus {
	background: #c7d2bf;
}

.content-panel__header {
	margin-bottom: 9px;
	border-bottom: 1px dashed var(--site-border);
}

.content-card__header {
	margin-bottom: 7px;
}

.content-card__header h2 {
	margin: 0;
	color: var(--site-muted);
	font-size: 1rem;
	line-height: 1.4;
}

.content-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 8px;
	margin-top: 5px;
	color: #6d6d6d;
	font-size: 0.78rem;
}

.lead-copy,
.ai-summary,
.detail-section p,
.content-body p {
	margin: 0;
}

.content-body {
	display: grid;
	gap: 0.9em;
	line-height: 1.65;
}

.note-panel {
	padding: 8px 9px;
	border: 1px dashed var(--site-border-soft);
	background: #fffdf0;
}

.read-more-line,
.detail-line {
	margin: 7px 0 0;
	font-size: 0.85rem;
	text-align: right;
}

.link-category + .link-category,
.detail-section + .detail-section {
	margin-top: var(--gap);
}

.link-list {
	display: grid;
	gap: 5px;
}

.link-item {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 6px;
	align-items: baseline;
	padding: 5px 6px;
	border: 1px solid #d5d0ca;
	background: #fff;
}

.external-note {
	color: var(--site-muted);
	font-size: 0.76rem;
}

.ai-list-item {
	display: grid;
	gap: 8px;
}

.ai-facts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 6px;
	margin: 0;
}

.ai-facts div {
	padding: 6px 7px;
	border: 1px solid #d9d4cd;
	background: #fff;
}

.ai-facts dt {
	margin-bottom: 3px;
	color: var(--site-muted);
	font-size: 0.78rem;
	font-weight: 700;
}

.ai-facts dd {
	margin: 0;
}

.history-list {
	display: grid;
	gap: 4px;
}

.history-list li,
.distribution-status,
.comment-closed-note {
	padding: 5px 6px;
	border: 1px solid #d9d4cd;
	background: #fff;
}

.button-link {
	display: inline-block;
	width: auto;
	padding: 5px 8px;
	border: 1px solid var(--site-border);
	border-radius: 2px;
	background: #d8dfd0;
	color: var(--site-text);
	text-decoration: none;
}

.button-link:hover,
.button-link:focus {
	background: #c7d2bf;
	color: var(--site-text);
	text-decoration: none;
}

.breadcrumb {
	margin-bottom: var(--gap);
	font-size: 0.82rem;
}

.breadcrumb ol {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.breadcrumb li + li::before {
	content: ">";
	margin-right: 4px;
	color: var(--site-muted);
}

.page-links,
.navigation.pagination,
.comment-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	justify-content: center;
	margin-top: var(--gap);
}

.nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	justify-content: center;
}

.page-links a,
.page-links .post-page-numbers,
.page-numbers,
.comment-pagination a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	min-height: 32px;
	padding: 4px 8px;
	border: 1px solid var(--site-border-soft);
	background: #fff;
	text-decoration: none;
}

.page-links .current,
.page-numbers.current {
	background: var(--site-sidebar-heading);
	font-weight: 700;
}

.sidebar-links a:hover,
.sidebar-links a:focus {
	background: var(--site-link-hover);
	color: #fff;
	text-decoration: none;
}

.comments-area {
	display: grid;
	gap: var(--gap);
	padding: 10px 12px 12px;
}

.comment-list {
	display: grid;
	gap: 8px;
}

.comment-list .comment-body {
	padding: 8px;
	border: 1px solid #d9d4cd;
	background: #fff;
}

.comment-list .children {
	margin: 8px 0 0 14px;
	padding: 0;
	list-style: none;
}

.comment-form {
	display: grid;
	gap: 8px;
}

.comment-form input,
.comment-form textarea {
	width: 100%;
	padding: 7px 8px;
	border: 1px solid var(--site-border);
	border-radius: 2px;
	font: inherit;
}

.comment-form input[type="submit"] {
	width: auto;
	background: #d8dfd0;
	cursor: pointer;
}

.heesey-access-counter__heading {
	margin: 0 0 6px;
	font-size: 0.9rem;
}

.heesey-access-counter__list {
	display: grid;
	gap: 3px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.heesey-access-counter__item {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	padding: 3px 0;
	border-bottom: 1px dotted var(--site-border-soft);
}

.site-footer {
	position: static;
	max-width: var(--site-max-width);
	height: 9px;
	margin: 0 auto;
	border-top: 1px solid var(--site-border-soft);
	background: transparent;
}

@media (768px <= width <= 1099px) {
	.site-layout {
		grid-template-columns: 220px minmax(0, 1fr);
		grid-template-areas:
			"left main"
			"right right";
	}
}

@media (width <= 767px) {
	.site-header__inner {
		padding-inline: 8px;
	}

	.custom-logo,
	.site-logo-image {
		max-height: 54px;
	}

	.site-layout {
		grid-template-columns: 1fr;
		grid-template-areas:
			"main"
			"right"
			"left";
		padding: 8px 8px 18px;
	}

	.pane-disclosure > summary {
		display: block;
	}

	.pane-disclosure__body {
		padding-top: 6px;
	}

	.page-shell {
		padding: 8px 8px 18px;
	}

	.ai-facts,
	.link-item {
		grid-template-columns: 1fr;
	}
}

@media screen and (width <= 782px) {
	body.admin-bar .site-header {
		top: 46px;
	}
}
