/*
Theme Name: Kadence Child (mytenbagger)
Template: kadence
Author: rogan
Description: mytenbagger.com global-reader Kadence child theme. Content width / typography tuned for English long-form equity analysis.
Version: 1.0.1
Text Domain: kadence-child
*/

/* ===== Global-reader typography ===== */

/* Comfortable reading measure on single posts */
.single .entry-content {
	max-width: 760px;
	margin-left: auto;
	margin-right: auto;
}

/* Body copy */
.entry-content {
	font-size: 1.075rem;
	line-height: 1.75;
}
.entry-content p,
.entry-content ul li,
.entry-content ol li {
	margin-bottom: 1.35em;
}

/* Heading rhythm */
.entry-content h2 {
	margin-top: 2.2em;
	margin-bottom: 0.7em;
	line-height: 1.3;
}
.entry-content h3 {
	margin-top: 1.8em;
	margin-bottom: 0.6em;
	line-height: 1.35;
}

/* Links */
.entry-content a {
	text-underline-offset: 0.15em;
}

/* Blockquote */
.entry-content blockquote {
	font-size: 1.05em;
	line-height: 1.7;
}

/* Images breathe */
.entry-content img {
	margin-top: 0.5em;
	margin-bottom: 0.5em;
}

/* ===== Readability tuning (2026-08-02) =====
   Measured: 730px / 17px → 85 chars per line (recommended 45~75),
   and h3 was 18px — nearly indistinguishable from body text. */
.entry-content {
	font-size: 1.1875rem;  /* 19px → ~77 chars per line */
	line-height: 1.8;
}
.entry-content h3 {
	font-size: 1.375rem;   /* 22px — h2(28) > h3(22) > body(19) */
	font-weight: 700;
}

/* ===== 목차 (2026-08-02) ===== */
.kdc-toc {
	margin: 2em 0 2.4em;
	padding: 1.1em 1.4em;
	border: 1px solid var(--global-palette7, #e5e7eb);
	border-left: 3px solid var(--global-palette1, #2b6cb0);
	border-radius: 4px;
	background: var(--global-palette8, #f8fafc);
	font-size: 0.95rem;
}
.kdc-toc-title {
	cursor: pointer;
	font-weight: 700;
	letter-spacing: -0.01em;
	list-style: none;
}
.kdc-toc-title::-webkit-details-marker { display: none; }
.kdc-toc-title::before {
	content: "▾";
	display: inline-block;
	margin-right: 0.5em;
	transition: transform 0.15s ease;
}
.kdc-toc:not([open]) .kdc-toc-title::before { transform: rotate(-90deg); }
.kdc-toc-list {
	margin: 0.9em 0 0;
	padding-left: 1.3em;
	line-height: 1.65;
}
.kdc-toc-list li { margin-bottom: 0.45em; }
.kdc-toc-sub {
	margin: 0.5em 0 0.2em;
	padding-left: 1.15em;
	list-style-type: circle;
}
.kdc-toc-sub li {
	margin-bottom: 0.35em;
	font-size: 0.95em;
	opacity: 0.85;
}
.kdc-toc-list a { text-decoration: none; }
.kdc-toc-list a:hover { text-decoration: underline; }

/* 앵커 이동 시 헤딩이 상단에 딱 붙지 않도록 */
.entry-content h2, .entry-content h3 { scroll-margin-top: 90px; }
@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}

/* ===== 저자 박스 아바타 / 공유 버튼 (2026-08-02) ===== */
.kdc-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--global-palette1, #2b6cb0);
	color: #fff;
	font-weight: 700;
	line-height: 1;
	flex: none;
}
.kdc-share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6em 0.9em;
	margin: 2.2em 0 0.5em;
	padding-top: 1.3em;
	border-top: 1px solid var(--global-palette7, #e5e7eb);
}
.kdc-share-label {
	font-size: 0.92rem;
	font-weight: 700;
	opacity: 0.75;
}
.kdc-share-btns { display: flex; flex-wrap: wrap; gap: 0.5em; }
.kdc-share-btn {
	display: inline-block;
	padding: 0.42em 0.95em;
	border: 1px solid var(--global-palette7, #e5e7eb);
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font-size: 0.88rem;
	line-height: 1.5;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease;
}
.kdc-share-btn:hover {
	background: var(--global-palette8, #f8fafc);
	border-color: var(--global-palette1, #2b6cb0);
	text-decoration: none;
}
/* hidden 속성이 display:inline-block에 밀리지 않도록 (UA 스타일보다 특이성이 높아서) */
.kdc-share-btn[hidden] { display: none; }

/* ===== 읽기시간 / 시리즈 연재 (2026-08-02) ===== */
.kdc-toc-title { display: flex; align-items: baseline; gap: 0.6em; }
.kdc-toc-meta {
	margin-left: auto;
	font-size: 0.85em;
	font-weight: 400;
	opacity: 0.62;
	letter-spacing: 0;
}
.kdc-series {
	margin: 2.2em 0 0.5em;
	padding: 1.2em 1.4em;
	border: 1px solid var(--global-palette7, #e5e7eb);
	border-radius: 6px;
	background: var(--global-palette8, #f8fafc);
	font-size: 0.95rem;
}
.kdc-series-head { display: flex; align-items: center; gap: 0.6em; margin-bottom: 0.8em; }
.kdc-series-badge {
	padding: 0.15em 0.6em;
	border-radius: 999px;
	background: var(--global-palette1, #2b6cb0);
	color: #fff;
	font-size: 0.78em;
	font-weight: 700;
	letter-spacing: 0.02em;
}
.kdc-series-list { margin: 0; padding-left: 1.4em; line-height: 1.6; }
.kdc-series-list li { margin-bottom: 0.45em; }
.kdc-series-list li.is-current { font-weight: 700; }
.kdc-series-list li.is-current > span { border-bottom: 2px solid var(--global-palette1, #2b6cb0); }
.kdc-series-count { margin: 0.9em 0 0; font-size: 0.86em; opacity: 0.68; }

/* 본문 표 가로 스크롤 (2026-08-03, 교훈 A62 — 루브릭 §6 미이행 해소)
   표만 스크롤되고 페이지 본문은 밀리지 않게 한다. 래퍼는 uiux.php의
   kdc_child_wrap_tables()가 렌더타임에 붙인다(저장 본문 비오염·소급 적용). */
.kdc-table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:1.4em 0;}
.kdc-table-scroll>table{margin:0;min-width:100%;}
.kdc-table-scroll>table th,.kdc-table-scroll>table td{white-space:normal;word-break:keep-all;}
