/*
Theme Name: SWELL Child Note
Theme URI: https://example.com/
Description: SWELL child theme for note-like top and post pages.
Author: Codex
Template: swell
Version: 1.0.0
Text Domain: swell-child-note
*/

/* note-like */
:root {
	--note-text-width: 720px;
	--note-shell-width: 1180px;
	--note-border: #e7e9ee;
	--note-text: #2f3441;
	--note-muted: #6b7280;
	--note-bg-soft: #f7f8fa;
	--note-card-bg: #ffffff;
	--note-radius: 8px;
}

body.is-note-top,
body.is-note-post {
	background: #fff;
	color: var(--note-text);
}

body.is-note-top .l-container,
body.is-note-post .l-container {
	max-width: var(--note-shell-width);
}

body.is-note-top #content,
body.is-note-post #content {
	padding-top: 32px;
}

body.is-note-top .c-pageTitle,
body.is-note-top .p-pageTitle,
body.is-note-post .c-pageTitle,
body.is-note-post .p-pageTitle {
	display: none;
}

body.is-note-top .l-mainContent__inner,
body.is-note-post .l-mainContent__inner {
	padding-inline: 20px;
}

body.is-note-post #main_content {
	max-width: calc(var(--note-text-width) + 40px);
	margin-inline: auto;
}

body.is-note-post .p-articleHead {
	margin-bottom: 24px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--note-border);
}

body.is-note-post .p-articleHead__ttl,
body.is-note-post .c-postTitle,
body.is-note-post h1 {
	font-size: clamp(2rem, 1.8rem + 0.8vw, 2.6rem);
	line-height: 1.45;
	font-weight: 700;
	letter-spacing: 0;
	color: #222;
}

body.is-note-post .p-articleMetas,
body.is-note-post .p-postMeta,
body.is-note-post .p-articleHead__meta {
	color: var(--note-muted);
	font-size: 0.92rem;
}

body.is-note-post .post_content {
	font-size: 1.05rem;
	line-height: 2;
	color: var(--note-text);
}

body.is-note-post .post_content > * {
	max-width: var(--note-text-width);
	margin-left: auto;
	margin-right: auto;
}

body.is-note-post .post_content > h2,
body.is-note-post .post_content > h3,
body.is-note-post .post_content > h4 {
	line-height: 1.65;
	margin-top: 3em;
	margin-bottom: 1em;
}

body.is-note-post .post_content > h2 {
	padding-bottom: 0.5em;
	border-bottom: 1px solid var(--note-border);
	font-size: 1.55rem;
}

body.is-note-post .post_content > p,
body.is-note-post .post_content > ul,
body.is-note-post .post_content > ol,
body.is-note-post .post_content > blockquote {
	margin-top: 1.2em;
	margin-bottom: 1.2em;
}

body.is-note-post .post_content blockquote {
	padding: 1.1em 1.25em;
	border-left: 3px solid #111;
	background: var(--note-bg-soft);
	border-radius: 0 var(--note-radius) var(--note-radius) 0;
}

body.is-note-post .post_content img,
body.is-note-post .post_content figure {
	border-radius: 6px;
}

body.is-note-post .post_content a {
	color: #1d4ed8;
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

body.is-note-top .p-postList,
body.is-note-top .p-postList__item,
body.is-note-top .p-postList .p-articleThumb,
body.is-note-top .p-postList .p-articleThumb__link {
	border-radius: var(--note-radius);
}

body.is-note-top .p-postList__item {
	padding: 18px;
	margin-bottom: 18px;
	border: 1px solid var(--note-border);
	background: var(--note-card-bg);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

body.is-note-top .p-postList__item:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
	border-color: #d9dde5;
}

body.is-note-top .p-postList__body {
	padding-top: 14px;
}

body.is-note-top .p-postList__title,
body.is-note-top .p-postList .c-postTitle {
	font-size: 1.2rem;
	line-height: 1.6;
	font-weight: 700;
	color: #222;
}

body.is-note-top .p-postList__excerpt {
	margin-top: 10px;
	color: var(--note-muted);
	line-height: 1.8;
}

body.is-note-top .p-postList__meta,
body.is-note-top .p-postList .p-postList__data {
	margin-top: 12px;
	color: var(--note-muted);
	font-size: 0.9rem;
}

body.is-note-top #sidebar,
body.is-note-post #sidebar {
	position: sticky;
	top: 24px;
}

body.is-note-top .c-widget,
body.is-note-post .c-widget {
	padding: 18px;
	border: 1px solid var(--note-border);
	border-radius: var(--note-radius);
	background: #fff;
	box-shadow: none;
}

body.is-note-top .c-widget + .c-widget,
body.is-note-post .c-widget + .c-widget {
	margin-top: 16px;
}

body.is-note-top .c-widget__title,
body.is-note-post .c-widget__title {
	margin-bottom: 14px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--note-border);
	font-size: 0.95rem;
	font-weight: 700;
}

@media (max-width: 959px) {
	body.is-note-top #content,
	body.is-note-post #content {
		padding-top: 20px;
	}

	body.is-note-top .l-mainContent__inner,
	body.is-note-post .l-mainContent__inner {
		padding-inline: 14px;
	}

	body.is-note-post .post_content {
		font-size: 1rem;
		line-height: 1.95;
	}

	body.is-note-top .p-postList__item {
		padding: 14px;
		margin-bottom: 14px;
	}
}
