/*
 * SEKILOG Article Archive UI — v0.8.9
 * Loaded only on verified archive/home/search contexts by PHP.
 * SWELL markup is preserved; this file only resets and restyles its post list.
 */

:root {
	--sk-archive-ink: #111315;
	--sk-archive-muted: #70757a;
	--sk-archive-line: #e2e4e1;
	--sk-archive-paper: #f8f8f5;
	--sk-archive-white: #fff;
	--sk-archive-lime: #b8ff1f;
	--sk-archive-dark: #0b0d0f;
	--sk-archive-max: 1296px;
}

/* --------------------------------------------------------------------------
 * Canvas / SWELL layout reset — archive route only because this file itself is
 * conditionally enqueued.
 * ----------------------------------------------------------------------- */
body {
	background: var(--sk-archive-paper) !important;
	color: var(--sk-archive-ink);
}

body #content.l-content {
	display: block !important;
	box-sizing: border-box;
	width: min(calc(100% - 48px), var(--sk-archive-max)) !important;
	max-width: var(--sk-archive-max) !important;
	margin-inline: auto !important;
	padding-top: 46px !important;
	padding-bottom: 72px !important;
}

body .l-mainContent,
body .l-mainContent__inner {
	box-sizing: border-box;
	width: 100% !important;
	max-width: none !important;
	min-width: 0;
	margin: 0 !important;
	padding-inline: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
}

body .l-sidebar {
	display: none !important;
}

body :where(.p-breadcrumb, .c-breadcrumb) {
	margin-bottom: 24px !important;
	font-size: 11px !important;
	color: #888d91 !important;
}

/* --------------------------------------------------------------------------
 * Archive title — editorial masthead
 * One intentional lime rule, no duplicate underline, no SWELL "category"
 * subtitle. The same treatment works for New / Category / Tag / Search pages.
 * ----------------------------------------------------------------------- */
body :where(.c-pageTitle, .l-archiveContent__title, .p-searchContent__title) {
	display: flex !important;
	flex-direction: column;
	align-items: flex-start;
	gap: 7px;
	margin: 0 0 46px !important;
	padding: 0 !important;
	font-size: clamp(34px, 3.5vw, 46px) !important;
	font-weight: 780 !important;
	line-height: 1.16 !important;
	letter-spacing: -.012em !important;
	font-feature-settings: "palt";
	color: var(--sk-archive-ink) !important;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
}

body :where(.c-pageTitle, .l-archiveContent__title, .p-searchContent__title)::before {
	content: "SEKILOG / ARTICLES";
	display: block;
	box-sizing: border-box;
	padding-left: 42px;
	color: var(--sk-archive-muted);
	font-size: 10px;
	font-weight: 750;
	line-height: 1.2;
	letter-spacing: .16em;
	background: linear-gradient(var(--sk-archive-lime), var(--sk-archive-lime)) 0 50% / 28px 2px no-repeat;
}

body :where(.c-pageTitle, .l-archiveContent__title, .p-searchContent__title)::after {
	display: none !important;
	content: none !important;
}

body :where(.c-pageTitle__mainTitle, .c-pageTitle__main, .l-archiveContent__title > span:first-child) {
	font: inherit !important;
	letter-spacing: inherit !important;
	color: inherit !important;
}

body :where(.c-pageTitle__subTitle, .c-pageTitle__sub, .taxonomy-description) {
	display: none !important;
}

/* --------------------------------------------------------------------------
 * SWELL card reset
 * SWELL's card type supplies margins, shadows and pseudo-elements. Reset every
 * property that can create space before applying the SEKILOG geometry.
 * ----------------------------------------------------------------------- */
body .p-postList {
	display: grid !important;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	grid-template-rows: auto;
	grid-auto-rows: auto;
	grid-auto-flow: row dense;
	gap: 20px !important;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

body .p-postList > .p-postList__item {
	box-sizing: border-box;
	width: auto !important;
	max-width: none !important;
	min-width: 0;
	height: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
}

body .p-postList__link {
	box-sizing: border-box;
	display: flex !important;
	flex-direction: column;
	width: 100%;
	height: 100%;
	min-width: 0;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden;
	color: inherit !important;
	text-decoration: none !important;
	background: var(--sk-archive-white) !important;
	border: 1px solid var(--sk-archive-line) !important;
	border-radius: 0 !important;
	box-shadow: none !important;
}

body .p-postList__link:hover {
	background: var(--sk-archive-white) !important;
}

body .p-postList__thumb,
body .p-postList__thumb.c-postThumb,
body .p-postList__thumb .c-postThumb__figure {
	box-sizing: border-box;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
}

body .p-postList__thumb {
	position: relative;
	flex: none;
	overflow: hidden;
	background: #eceeeb !important;
}

body .p-postList__thumb .c-postThumb__figure {
	height: 100% !important;
}

body .p-postList__thumb :where(img, .c-postThumb__img) {
	display: block;
	width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
	object-fit: cover !important;
	transition: transform .3s ease;
}

body .p-postList__item:hover .p-postList__thumb :where(img, .c-postThumb__img) {
	transform: scale(1.02);
}

body .p-postList__body {
	box-sizing: border-box;
	display: flex !important;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
	margin: 0 !important;
	padding: 16px 16px 15px !important;
	background: var(--sk-archive-white) !important;
	border: 0 !important;
	border-radius: 0 !important;
}

/* SWELL can use these pseudo-elements as card/list decorations. They are not
 * part of the SEKILOG archive UI and were the source of visual dead space. */
body .p-postList__body::before,
body .p-postList__body::after {
	display: none !important;
	content: none !important;
}

body .p-postList__title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
	margin: 0 !important;
	padding: 0 !important;
	font-size: 16px !important;
	font-weight: 750 !important;
	line-height: 1.48 !important;
	letter-spacing: -.025em !important;
	font-feature-settings: "palt";
	color: var(--sk-archive-ink) !important;
	background: transparent !important;
	border: 0 !important;
}

body .p-postList__excerpt,
body .p-postList__desc {
	margin: 9px 0 0 !important;
	padding: 0 !important;
	font-size: 12px !important;
	line-height: 1.75 !important;
	color: var(--sk-archive-muted) !important;
}

body :where(.p-postList__metas, .p-postList__meta, .p-postList__times) {
	margin: auto 0 0 !important;
	padding: 12px 0 0 !important;
	font-size: 10px !important;
	font-weight: 650 !important;
	line-height: 1.4 !important;
	color: #858a8e !important;
}

/* --------------------------------------------------------------------------
 * Thumbnail badge — editorial black/lime treatment.
 * SWELL outputs .c-postThumb__cat.icon-folder; the folder glyph is removed.
 * On the posts page JS changes the authored category text to NEW.
 * ----------------------------------------------------------------------- */
body .c-postThumb__cat {
	top: 10px !important;
	right: 10px !important;
	left: auto !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	min-width: 0;
	margin: 0 !important;
	padding: 6px 9px 5px !important;
	font-size: 9px !important;
	font-weight: 800 !important;
	line-height: 1 !important;
	letter-spacing: .11em !important;
	text-transform: uppercase;
	color: var(--sk-archive-lime) !important;
	background: var(--sk-archive-dark) !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
}

body .c-postThumb__cat::before,
body .c-postThumb__cat.icon-folder::before {
	display: none !important;
	content: none !important;
}

html.sk-archive-is-new body .c-postThumb__cat {
	letter-spacing: .14em !important;
}

/* --------------------------------------------------------------------------
 * Desktop editorial feature: 1 large + 2 compact + regular 3-column grid.
 * The first two rows have controlled heights so the lead article cannot grow
 * unpredictably from the rail cards' copy length.
 * ----------------------------------------------------------------------- */
@media (min-width: 1024px) {
	body .p-postList {
		grid-template-rows: repeat(2, clamp(250px, 20vw, 292px));
		align-items: stretch;
	}

	body .p-postList > .p-postList__item:nth-of-type(1) {
		grid-column: 1 / span 4;
		grid-row: 1 / span 2;
	}

	body .p-postList > .p-postList__item:nth-of-type(2) {
		grid-column: 5 / span 2;
		grid-row: 1;
	}

	body .p-postList > .p-postList__item:nth-of-type(3) {
		grid-column: 5 / span 2;
		grid-row: 2;
	}

	body .p-postList > .p-postList__item:nth-of-type(n + 4) {
		grid-column: span 2;
	}

	/* Lead article: wide editorial image + roomy copy. */
	body .p-postList > .p-postList__item:nth-of-type(1) .p-postList__link {
		height: 100%;
	}

	body .p-postList > .p-postList__item:nth-of-type(1) .p-postList__thumb {
		height: auto !important;
		aspect-ratio: 2.08 / 1 !important;
	}

	body .p-postList > .p-postList__item:nth-of-type(1) .p-postList__body {
		padding: 21px 22px 19px !important;
	}

	body .p-postList > .p-postList__item:nth-of-type(1) .p-postList__title {
		display: block !important;
		-webkit-line-clamp: unset;
		overflow: hidden;
		max-height: calc(4.32em + 4px);
		padding-bottom: 4px !important;
		font-size: clamp(22px, 2vw, 28px) !important;
		line-height: 1.44 !important;
	}

	body .p-postList > .p-postList__item:nth-of-type(1) :where(.p-postList__excerpt, .p-postList__desc) {
		display: -webkit-box !important;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		overflow: hidden;
	}

	/* Secondary feature cards: wide thumbnail above compact copy.
	 * Avoid portrait crops so product photography keeps its original character. */
	body .p-postList > .p-postList__item:nth-of-type(2) .p-postList__link,
	body .p-postList > .p-postList__item:nth-of-type(3) .p-postList__link {
		display: flex !important;
		flex-direction: column;
		height: 100%;
	}

	body .p-postList > .p-postList__item:nth-of-type(2) .p-postList__thumb,
	body .p-postList > .p-postList__item:nth-of-type(3) .p-postList__thumb {
		width: 100% !important;
		height: auto !important;
		min-height: 0 !important;
		aspect-ratio: 2.08 / 1 !important;
	}

	body .p-postList > .p-postList__item:nth-of-type(2) .p-postList__body,
	body .p-postList > .p-postList__item:nth-of-type(3) .p-postList__body {
		min-height: 0;
		padding: 12px 14px 11px !important;
	}

	body .p-postList > .p-postList__item:nth-of-type(2) .p-postList__title,
	body .p-postList > .p-postList__item:nth-of-type(3) .p-postList__title {
		-webkit-line-clamp: 3;
		font-size: 14px !important;
		line-height: 1.46 !important;
	}

	body .p-postList > .p-postList__item:nth-of-type(2) :where(.p-postList__excerpt, .p-postList__desc),
	body .p-postList > .p-postList__item:nth-of-type(3) :where(.p-postList__excerpt, .p-postList__desc) {
		display: none !important;
	}

	body .p-postList > .p-postList__item:nth-of-type(2) :where(.p-postList__metas, .p-postList__meta, .p-postList__times),
	body .p-postList > .p-postList__item:nth-of-type(3) :where(.p-postList__metas, .p-postList__meta, .p-postList__times) {
		padding-top: 8px !important;
	}

	/* Standard cards */
	body .p-postList > .p-postList__item:nth-of-type(n + 4) .p-postList__thumb {
		aspect-ratio: 16 / 9 !important;
	}

	body .p-postList > .p-postList__item:nth-of-type(n + 4) .p-postList__body {
		min-height: 126px;
	}

	body .p-postList > .p-postList__item:nth-of-type(n + 4) :where(.p-postList__excerpt, .p-postList__desc) {
		display: none !important;
	}
}

/* --------------------------------------------------------------------------
 * Tablet
 * ----------------------------------------------------------------------- */
@media (min-width: 768px) and (max-width: 1023px) {
	body #content.l-content {
		width: min(calc(100% - 36px), var(--sk-archive-max)) !important;
		padding-top: 34px !important;
		padding-bottom: 56px !important;
	}

	body .p-postList {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-template-rows: auto;
		gap: 18px !important;
	}

	body .p-postList > .p-postList__item:first-of-type {
		grid-column: 1 / -1;
	}

	body .p-postList > .p-postList__item:first-of-type .p-postList__thumb {
		aspect-ratio: 16 / 8.5;
	}

	body .p-postList > .p-postList__item:first-of-type .p-postList__title {
		font-size: 22px !important;
	}

	body .p-postList__thumb {
		aspect-ratio: 16 / 9;
	}

	body .p-postList__excerpt,
	body .p-postList__desc {
		display: none !important;
	}
}

/* --------------------------------------------------------------------------
 * Smartphone: lead article + balanced 2-column grid.
 * The first article keeps the large editorial treatment. Remaining cards use
 * uncropped 16:9 thumbnails in two columns. Titles are not clamped; each grid
 * row stretches to the tallest card so paired cards remain visually aligned.
 * ----------------------------------------------------------------------- */
@media (max-width: 767px) {
	body #content.l-content {
		width: min(calc(100% - 24px), var(--sk-archive-max)) !important;
		padding-top: 24px !important;
		padding-bottom: 44px !important;
	}

	body :where(.p-breadcrumb, .c-breadcrumb) {
		margin-bottom: 15px !important;
		font-size: 10px !important;
	}

	body :where(.c-pageTitle, .l-archiveContent__title, .p-searchContent__title) {
		gap: 6px;
		margin-bottom: 28px !important;
		padding: 0 !important;
		font-size: 31px !important;
	}

	body :where(.c-pageTitle, .l-archiveContent__title, .p-searchContent__title)::before {
		padding-left: 36px;
		font-size: 9px;
		background-size: 24px 2px;
	}

	body .p-postList {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-template-rows: none;
		grid-auto-rows: auto;
		gap: 12px !important;
		align-items: stretch;
	}

	body .p-postList > .p-postList__item {
		grid-column: auto !important;
		grid-row: auto !important;
		align-self: stretch;
		margin: 0 !important;
	}

	/* Lead story: preserve the original large mobile treatment. */
	body .p-postList > .p-postList__item:first-of-type {
		grid-column: 1 / -1 !important;
		margin-bottom: 6px !important;
	}

	body .p-postList > .p-postList__item .p-postList__link {
		display: flex !important;
		flex-direction: column !important;
		height: 100% !important;
		min-height: 0 !important;
	}

	body .p-postList > .p-postList__item .p-postList__thumb {
		width: 100% !important;
		height: auto !important;
		min-height: 0 !important;
		aspect-ratio: 16 / 9 !important;
		background: #f1f2ef !important;
	}

	body .p-postList > .p-postList__item:not(:first-of-type) .p-postList__thumb .c-postThumb__figure {
		display: flex !important;
		align-items: center;
		justify-content: center;
		height: 100% !important;
		background: #f1f2ef !important;
	}

	body .p-postList > .p-postList__item:not(:first-of-type) .p-postList__thumb :where(img, .c-postThumb__img) {
		width: 100% !important;
		height: 100% !important;
		object-fit: contain !important;
		transform: none !important;
	}

	/* Keep the NEW/category badge visible on SP as requested. */
	body .p-postList .c-postThumb__cat {
		display: inline-flex !important;
	}

	body .p-postList > .p-postList__item .p-postList__body {
		display: flex !important;
		flex: 1 1 auto;
		flex-direction: column;
		min-height: 0;
		padding: 11px 11px 10px !important;
	}

	body .p-postList > .p-postList__item:first-of-type .p-postList__body {
		padding: 16px 15px 14px !important;
	}

	/* No title truncation on SP. Paired cards still align because the grid row
	 * height follows whichever title is longer. */
	body .p-postList > .p-postList__item .p-postList__title,
	body .p-postList > .p-postList__item:first-of-type .p-postList__title,
	body .p-postList > .p-postList__item:nth-of-type(2) .p-postList__title,
	body .p-postList > .p-postList__item:nth-of-type(3) .p-postList__title {
		display: block !important;
		-webkit-line-clamp: unset !important;
		overflow: visible !important;
		max-height: none !important;
		padding: 0 !important;
		font-size: 13px !important;
		font-weight: 750 !important;
		line-height: 1.48 !important;
		letter-spacing: -.018em !important;
	}

	body .p-postList > .p-postList__item:first-of-type .p-postList__title {
		font-size: 20px !important;
		line-height: 1.43 !important;
	}

	body .p-postList > .p-postList__item:first-of-type :where(.p-postList__excerpt, .p-postList__desc) {
		display: -webkit-box !important;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		overflow: hidden;
	}

	body .p-postList > .p-postList__item:not(:first-of-type) :where(.p-postList__excerpt, .p-postList__desc) {
		display: none !important;
	}

	body .p-postList > .p-postList__item :where(.p-postList__metas, .p-postList__meta, .p-postList__times) {
		margin-top: auto !important;
		padding-top: 10px !important;
		font-size: 9px !important;
	}

	body :where(.c-pagination, .pagination, .nav-links) {
		margin-top: 34px !important;
	}
}

@media (max-width: 380px) {
	body #content.l-content {
		width: min(calc(100% - 20px), var(--sk-archive-max)) !important;
	}

	body .p-postList {
		gap: 9px !important;
	}

	body .p-postList > .p-postList__item:not(:first-of-type) .p-postList__body {
		padding: 10px 9px 9px !important;
	}

	body .p-postList > .p-postList__item:not(:first-of-type) .p-postList__title {
		font-size: 12px !important;
	}
}

/* Pagination */
body :where(.c-pagination, .pagination, .nav-links) {
	margin-top: 50px !important;
}

body :where(.c-pagination, .pagination, .nav-links) :where(a, span) {
	border-radius: 0 !important;
}

body :where(.c-pagination, .pagination, .nav-links) .current {
	background: var(--sk-archive-dark) !important;
	color: #fff !important;
}


/* --------------------------------------------------------------------------
 * Archive About sign-off — inserted immediately after pagination by the
 * dedicated archive controller. It intentionally echoes the homepage About
 * without requiring the homepage stylesheet on archive routes.
 * ----------------------------------------------------------------------- */
.sk-archive-about {
	display: grid;
	grid-template-columns: 160px minmax(0, 1fr);
	align-items: center;
	gap: 40px;
	box-sizing: border-box;
	width: 100%;
	margin: 64px 0 0 !important;
	padding: 48px 0 44px !important;
	border-top: 1px solid var(--sk-archive-line);
	background: transparent;
}

.sk-archive-about[hidden] {
	display: none !important;
}

.sk-archive-about__visual {
	display: grid;
	width: 160px;
	height: 160px;
	place-items: center;
	margin: 0;
	overflow: hidden;
	border-radius: 50%;
	background: radial-gradient(circle at 45% 35%, #4b4e54 0%, #121316 72%);
}

.sk-archive-about__visual img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sk-archive-about__mark {
	color: var(--sk-archive-lime);
	font: 750 3.2rem/1 system-ui, sans-serif;
}

.sk-archive-about__copy {
	display: grid;
	gap: 10px;
	min-width: 0;
	max-width: 860px;
	margin: 0;
}

.sk-archive-about__eyebrow {
	margin: 0;
	padding-left: 38px;
	color: var(--sk-archive-muted);
	font-size: 10px;
	font-weight: 750;
	line-height: 1.2;
	letter-spacing: .14em;
	background: linear-gradient(var(--sk-archive-lime), var(--sk-archive-lime)) 0 50% / 26px 2px no-repeat;
}

.sk-archive-about__title {
	margin: 0 !important;
	padding: 0 !important;
	font-size: clamp(24px, 2.3vw, 32px) !important;
	font-weight: 760 !important;
	line-height: 1.35 !important;
	letter-spacing: -.035em !important;
	color: var(--sk-archive-ink) !important;
	background: none !important;
	border: 0 !important;
}

.sk-archive-about__title::before,
.sk-archive-about__title::after {
	display: none !important;
	content: none !important;
}

.sk-archive-about__description {
	max-width: 760px;
	margin: 0;
	color: var(--sk-archive-muted);
	font-size: 14px;
	line-height: 1.8;
}

.sk-archive-about__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 2px;
}

.sk-archive-about__button {
	display: inline-flex;
	min-height: 40px;
	align-items: center;
	justify-content: center;
	padding: 0 17px;
	color: var(--sk-archive-ink) !important;
	font-size: 11px;
	font-weight: 750;
	letter-spacing: .04em;
	text-decoration: none !important;
	border: 1px solid #d8dad7;
	border-radius: 999px;
	background: var(--sk-archive-white);
	transition: border-color .18s ease, background .18s ease;
}

.sk-archive-about__button:hover {
	border-color: var(--sk-archive-ink);
	background: #f2f3ef;
}

.sk-archive-about .sk-social-links {
	margin-top: 4px;
}

.sk-archive-about .sk-social-links ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.sk-archive-about .sk-social-links li {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.sk-archive-about .sk-social-links a {
	display: grid;
	width: 38px;
	height: 38px;
	place-items: center;
	color: var(--sk-archive-ink) !important;
	text-decoration: none !important;
	border: 1px solid #d8dad7;
	border-radius: 50%;
	background: var(--sk-archive-white);
	transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}

.sk-archive-about .sk-social-links a:hover {
	color: var(--sk-archive-dark) !important;
	border-color: var(--sk-archive-lime);
	background: var(--sk-archive-lime);
	transform: translateY(-1px);
}

.sk-archive-about .sk-social-icon,
.sk-archive-about .sk-social-icon svg {
	display: block;
	width: 18px;
	height: 18px;
}

@media (max-width: 767px) {
	.sk-archive-about {
		grid-template-columns: 1fr;
		gap: 20px;
		margin-top: 42px !important;
		padding: 34px 0 26px !important;
	}

	.sk-archive-about__visual {
		width: 112px;
		height: 112px;
	}

	.sk-archive-about__copy {
		gap: 9px;
	}

	.sk-archive-about__title {
		font-size: 24px !important;
	}

	.sk-archive-about__description {
		font-size: 13px;
	}
}
