/*
Theme Name: 5bell1 Lab (GeneratePress Child)
Template: generatepress
Description: Research-lab design for 5bell1 AI Trading Lab. System fonts, no extra JS.
Version: 1.3.0
Text Domain: lab-child
*/

:root {
	--lab-bg: #f6f7f9;
	--lab-surface: #ffffff;
	--lab-ink: #0e1726;
	--lab-ink-2: #465267;
	--lab-ink-3: #7a8699;
	--lab-line: #e2e6ed;
	--lab-accent: #2350d8;        /* accent 1: verification / links */
	--lab-accent-soft: #e9efff;
	--lab-warn: #b4540a;          /* accent 2: failure / unexpected */
	--lab-warn-soft: #fff3e6;
	--lab-term: #0b1220;          /* terminal band */
	--lab-radius: 10px;
	--lab-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
	--lab-sans: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", "Malgun Gothic", "Segoe UI", Roboto, sans-serif;
}

body {
	background: var(--lab-bg);
	color: var(--lab-ink);
	font-family: var(--lab-sans);
	font-size: 17px;
	line-height: 1.75;
	-webkit-font-smoothing: antialiased;
	word-break: keep-all;
	overflow-wrap: break-word;
}
h1, h2, h3, h4 { color: var(--lab-ink); letter-spacing: -0.02em; line-height: 1.35; font-weight: 750; }
a { color: var(--lab-accent); }
a:hover, a:focus { color: var(--lab-ink); }
:focus-visible { outline: 2px solid var(--lab-accent); outline-offset: 2px; }

/* ---------- Header (quiet) ---------- */
.site-header { border-bottom: 1px solid var(--lab-line); }
.inside-header { padding-top: 14px; padding-bottom: 14px; }
.main-title { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; }
.main-title a { color: var(--lab-ink); text-decoration: none; }
.main-title a::before {
	content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px;
	background: var(--lab-accent); border-radius: 2px; vertical-align: 1px;
}
.main-navigation .main-nav ul li a { font-size: 15px; font-weight: 600; color: var(--lab-ink-2); padding-left: 12px; padding-right: 12px; }
.main-navigation .main-nav ul li[class*="current-menu-"] > a,
.main-navigation .main-nav ul li a:hover { color: var(--lab-accent); }

/* ---------- Layout ---------- */
.lab-wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.one-container .site-content { padding: 32px 0; background: transparent; }
.one-container .container, .separate-containers .inside-article, .one-container .inside-article { background: transparent; }
.single .inside-article, .page .inside-article { max-width: 760px; margin: 0 auto; padding: 8px 20px 40px; }

/* ---------- Hero ---------- */
.lab-hero {
	background:
		linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 100% 32px,
		linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 32px 100%,
		var(--lab-term);
	color: #e6ebf3;
	padding: 64px 0 56px;
}
.lab-hero__eyebrow { font-family: var(--lab-mono); font-size: 13px; letter-spacing: .08em; color: #8fb0ff; margin: 0 0 14px; }
.lab-hero h1 { color: #fff; font-size: clamp(28px, 4.4vw, 44px); line-height: 1.25; margin: 0 0 16px; max-width: 18em; }
.lab-hero__sub { font-size: clamp(16px, 2vw, 19px); color: #b9c3d3; max-width: 36em; margin: 0 0 28px; }
.lab-hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.lab-btn {
	display: inline-flex; align-items: center; gap: 6px; padding: 12px 20px; border-radius: 8px;
	font-weight: 700; font-size: 16px; text-decoration: none; line-height: 1.2; min-height: 44px;
}
.lab-btn--primary { background: var(--lab-accent); color: #fff; }
.lab-btn--primary:hover { background: #1b40b0; color: #fff; }
.lab-btn--ghost { border: 1px solid rgba(255,255,255,.28); color: #fff; }
.lab-btn--ghost:hover { border-color: #fff; color: #fff; }
.lab-hero__note { font-size: 13px; color: #8a96a8; margin: 0; }
.lab-hero__stages { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; padding: 0; list-style: none; font-family: var(--lab-mono); font-size: 12px; color: #8a96a8; }
.lab-hero__stages li { border: 1px solid rgba(255,255,255,.14); border-radius: 4px; padding: 3px 8px; }
.lab-hero__stages li + li::before { content: "→ "; color: #56627a; }

/* ---------- Sections ---------- */
.lab-section { margin: 44px 0; }
.lab-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.lab-section__title { font-size: 22px; margin: 0; }
.lab-section__desc { color: var(--lab-ink-3); font-size: 14px; margin: 2px 0 0; }
.lab-section__more { font-size: 15px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.lab-section--warn .lab-section__title::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--lab-warn); margin-right: 8px; vertical-align: 3px; }

.lab-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .lab-grid--3, .lab-grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .lab-grid--3 { grid-template-columns: repeat(3, 1fr); } }

.lab-topics { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.lab-topics a { display: inline-block; padding: 8px 14px; border: 1px solid var(--lab-line); background: var(--lab-surface); border-radius: 999px; text-decoration: none; color: var(--lab-ink-2); font-weight: 600; font-size: 15px; min-height: 40px; }
.lab-topics a:hover { border-color: var(--lab-accent); color: var(--lab-accent); }
.lab-topics small { color: var(--lab-ink-3); font-family: var(--lab-mono); margin-left: 4px; }

.lab-empty { background: var(--lab-surface); border: 1px dashed var(--lab-line); border-radius: var(--lab-radius); padding: 28px; color: var(--lab-ink-2); }
.lab-empty strong { display: block; color: var(--lab-ink); font-size: 18px; margin-bottom: 6px; }

/* ---------- Cards ---------- */
.lab-card { background: var(--lab-surface); border: 1px solid var(--lab-line); border-radius: var(--lab-radius); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.lab-card:hover { border-color: #c5cfdf; box-shadow: 0 6px 20px rgba(14,23,38,.07); }
.lab-card__link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.lab-card__link:hover { color: inherit; }
.lab-card__media { aspect-ratio: 16 / 9; background: var(--lab-term); overflow: hidden; }
.lab-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lab-thumb {
	height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 0 8%;
	background:
		linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px) 0 0 / 100% 24px,
		linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px) 0 0 / 24px 100%,
		var(--lab-term);
}
.lab-thumb__text { font-family: var(--lab-mono); font-weight: 700; color: #fff; font-size: clamp(22px, 5vw, 30px); line-height: 1.2; letter-spacing: -0.01em; }
.lab-thumb__series { font-family: var(--lab-mono); font-size: 12px; color: #8fb0ff; margin-top: 10px; }
.lab-card__body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; flex: 1; }
.lab-card__meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lab-card__cat { font-size: 13px; font-weight: 700; color: var(--lab-accent); }
.lab-card__title {
	font-size: 19px; line-height: 1.4; margin: 0;
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.lab-card__metric { margin: 0; font-family: var(--lab-mono); font-size: 14px; font-weight: 600; color: var(--lab-ink); background: var(--lab-bg); border-left: 3px solid var(--lab-accent); padding: 6px 10px; border-radius: 0 6px 6px 0; }
.lab-card__excerpt { margin: 0; color: var(--lab-ink-2); font-size: 15px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lab-card__foot { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: 13px; color: var(--lab-ink-3); }
.lab-card__cta { margin-left: auto; color: var(--lab-accent); font-weight: 700; font-size: 14px; }
.lab-card:hover .lab-card__cta { text-decoration: underline; }

/* Featured (first card larger on wide screens) */
@media (min-width: 1000px) {
	.lab-grid--feature { grid-template-columns: 1.4fr 1fr; grid-template-rows: auto auto; }
	.lab-grid--feature > .lab-card:first-child { grid-row: span 2; }
	.lab-grid--feature > .lab-card:first-child .lab-card__title { font-size: 24px; }
	.lab-grid--feature > .lab-card:not(:first-child) .lab-card__media { display: none; }
}

/* ---------- Badges ---------- */
.lab-badges { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.lab-badge { font-family: var(--lab-mono); font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 2px 7px; border-radius: 4px; border: 1px solid var(--lab-line); color: var(--lab-ink-2); background: var(--lab-surface); line-height: 1.6; white-space: nowrap; }
.lab-badge--oos { color: var(--lab-accent); border-color: #c3d2ff; background: var(--lab-accent-soft); }
.lab-badge--dryrun { color: var(--lab-ink); border-color: #cfd5df; background: #eef1f5; }
.lab-badge--live { color: #fff; background: var(--lab-ink); border-color: var(--lab-ink); }
.lab-verdict--pass { color: var(--lab-accent); border-color: var(--lab-accent); }
.lab-verdict--fail { color: var(--lab-warn); border-color: #f0c9a4; background: var(--lab-warn-soft); }
.lab-verdict--mixed, .lab-verdict--pending { color: var(--lab-ink-2); }

/* ---------- Single post ---------- */
.single .entry-header { margin-bottom: 20px; }
.single h1.entry-title { font-size: clamp(26px, 4vw, 36px); line-height: 1.3; }
.entry-meta { font-size: 14px; color: var(--lab-ink-3); }
.entry-content { font-size: 18px; line-height: 1.85; }
.entry-content > * + * { margin-top: 1.1em; }
.entry-content h2 { font-size: 25px; margin: 2.2em 0 .7em; padding-top: .2em; scroll-margin-top: 20px; }
.entry-content h3 { font-size: 20px; margin: 1.8em 0 .5em; }
.entry-content p { margin-bottom: 1.1em; }
.entry-content .lab-lead { font-size: 20px; line-height: 1.7; color: var(--lab-ink); font-weight: 500; border-left: 4px solid var(--lab-accent); padding-left: 16px; }
.entry-content img { border-radius: 8px; height: auto; }
.entry-content figure figcaption { font-size: 14px; color: var(--lab-ink-3); text-align: center; }
.entry-content blockquote { border-left: 4px solid var(--lab-line); margin-left: 0; padding: 4px 0 4px 18px; color: var(--lab-ink-2); font-style: normal; }

/* Tables: horizontal scroll on phones, numbers aligned */
.entry-content .wp-block-table { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.6em 0; }
.entry-content table { border-collapse: collapse; width: 100%; font-size: 15px; font-variant-numeric: tabular-nums; min-width: 480px; }
.entry-content th, .entry-content td { border: 0; border-bottom: 1px solid var(--lab-line); padding: 10px 12px; text-align: left; white-space: nowrap; }
.entry-content thead th { background: var(--lab-bg); font-weight: 700; color: var(--lab-ink-2); font-size: 13px; }
.entry-content td:not(:first-child), .entry-content th:not(:first-child) { text-align: right; font-family: var(--lab-mono); }

/* Code */
.entry-content pre, .entry-content .wp-block-code {
	background: var(--lab-term); color: #dbe3f0; font-family: var(--lab-mono); font-size: 14px; line-height: 1.65;
	padding: 16px 18px; border-radius: 8px; overflow-x: auto; border: 0; white-space: pre;
}
.entry-content :not(pre) > code { font-family: var(--lab-mono); font-size: .88em; background: #eef1f6; padding: 2px 5px; border-radius: 4px; }

/* Trust box */
.lab-trust { border: 1px solid var(--lab-line); background: var(--lab-surface); border-radius: var(--lab-radius); padding: 14px 16px; margin: 0 0 24px; font-size: 15px; }
.lab-trust__head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lab-trust__title { font-weight: 700; font-size: 14px; color: var(--lab-ink-2); margin-right: 4px; }
.lab-trust__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px 16px; margin: 12px 0 0; }
.lab-trust__grid div { margin: 0; }
.lab-trust__grid dt { font-size: 12px; color: var(--lab-ink-3); font-weight: 600; }
.lab-trust__grid dd { margin: 0; font-family: var(--lab-mono); font-size: 14px; font-weight: 600; }

/* TOC */
.lab-toc { background: var(--lab-surface); border: 1px solid var(--lab-line); border-radius: var(--lab-radius); padding: 12px 16px; margin: 0 0 28px; font-size: 15px; }
.lab-toc summary { cursor: pointer; font-weight: 700; color: var(--lab-ink-2); }
.lab-toc ol { margin: 10px 0 2px 1.3em; line-height: 1.9; }
.lab-toc a { text-decoration: none; }

/* Metrics cards */
.lab-metrics { margin: 1.8em 0; }
.lab-metrics__title { font-size: 13px; font-weight: 700; color: var(--lab-ink-3); letter-spacing: .04em; margin-bottom: 8px; text-align: left !important; }
.lab-metrics__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0; }
@media (min-width: 600px) { .lab-metrics__grid { grid-template-columns: repeat(4, 1fr); } }
.lab-metric { background: var(--lab-surface); border: 1px solid var(--lab-line); border-radius: 8px; padding: 12px 14px; margin: 0; }
.lab-metric dt { font-size: 12px; font-weight: 700; color: var(--lab-ink-3); letter-spacing: .03em; }
.lab-metric dd { margin: 2px 0 0; font-family: var(--lab-mono); font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--lab-ink); line-height: 1.3; }
.lab-metric dd.is-neg { color: var(--lab-warn); }
.lab-metrics__note { font-size: 13px; color: var(--lab-ink-3); margin: 8px 0 0; }

/* Next experiment / series / related */
.lab-next { margin: 40px 0 20px; padding: 18px 20px; border-radius: var(--lab-radius); background: var(--lab-accent-soft); border: 1px solid #c9d6ff; }
.lab-next__label { font-family: var(--lab-mono); font-size: 12px; font-weight: 700; color: var(--lab-accent); letter-spacing: .08em; }
.lab-next p { margin: 4px 0 0; font-size: 18px; }
.lab-series { margin: 20px 0; border: 1px solid var(--lab-line); border-radius: var(--lab-radius); background: var(--lab-surface); overflow: hidden; }
.lab-series__head { padding: 10px 16px; border-bottom: 1px solid var(--lab-line); font-size: 14px; font-weight: 700; display: flex; justify-content: space-between; }
.lab-series__head a { text-decoration: none; }
.lab-series__head span { font-family: var(--lab-mono); color: var(--lab-ink-3); }
.lab-series__grid { display: grid; grid-template-columns: 1fr 1fr; }
.lab-series__cell { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; text-decoration: none; color: var(--lab-ink); min-height: 72px; }
.lab-series__cell + .lab-series__cell { border-left: 1px solid var(--lab-line); }
.lab-series__next { text-align: right; background: linear-gradient(90deg, transparent, var(--lab-accent-soft)); }
.lab-series__dir { font-size: 13px; font-weight: 700; color: var(--lab-accent); }
.lab-series__title { font-weight: 700; line-height: 1.4; font-size: 16px; }
.lab-series__cell:hover .lab-series__title { text-decoration: underline; }
@media (max-width: 599px) {
	.lab-series__grid { grid-template-columns: 1fr; }
	.lab-series__cell + .lab-series__cell { border-left: 0; border-top: 1px solid var(--lab-line); }
	.lab-series__next { order: -1; }
}
.lab-related { margin: 40px 0 10px; }
.lab-related .lab-section__title { font-size: 20px; margin-bottom: 14px; }
.lab-related .lab-card__title { font-size: 17px; }
.lab-disclaimer-note { margin-top: 28px; font-size: 13px; line-height: 1.6; color: var(--lab-ink-3); border-top: 1px solid var(--lab-line); padding-top: 14px; }

/* Zoom dialog */
.lab-zoomable { cursor: zoom-in; }
.lab-zoom { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 94vh; }
.lab-zoom::backdrop { background: rgba(8,12,20,.88); }
.lab-zoom img { max-width: 96vw; max-height: 90vh; display: block; border-radius: 6px; }
.lab-zoom__close { position: fixed; top: 12px; right: 16px; background: none; border: 0; color: #fff; font-size: 34px; line-height: 1; cursor: pointer; }

/* ---------- Archives ---------- */
.lab-archive-head { margin: 8px 0 24px; }
.lab-archive-head .lab-kicker { font-family: var(--lab-mono); font-size: 12px; color: var(--lab-accent); letter-spacing: .08em; }
.lab-archive-head h1 { font-size: clamp(26px, 4vw, 34px); margin: 4px 0 6px; }
.lab-archive-head .taxonomy-description, .lab-archive-head p { color: var(--lab-ink-2); margin: 0; max-width: 46em; }
.lab-pagination { margin: 36px 0; text-align: center; }
.lab-pagination .page-numbers { display: inline-block; min-width: 40px; padding: 8px 10px; margin: 2px; border-radius: 6px; border: 1px solid var(--lab-line); background: var(--lab-surface); text-decoration: none; }
.lab-pagination .current { background: var(--lab-ink); color: #fff; border-color: var(--lab-ink); }

/* ---------- Footer ---------- */
.lab-footer-note { background: var(--lab-surface); border-top: 1px solid var(--lab-line); padding: 28px 0; font-size: 14px; color: var(--lab-ink-2); }
.lab-footer-note p { margin: 0 0 12px; max-width: 60em; line-height: 1.7; }
.lab-footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 0; padding: 0; }
.lab-footer-links a { color: var(--lab-ink-2); font-weight: 600; text-decoration: none; }
.lab-footer-links a:hover { color: var(--lab-accent); }
.site-info { background: var(--lab-bg); color: var(--lab-ink-3); font-size: 13px; }

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
	body { font-size: 16px; }
	.lab-hero { padding: 40px 0 36px; }
	.lab-hero h1 { font-size: 27px; }
	.lab-hero__stages { display: none; }
	.lab-btn { flex: 1 1 auto; justify-content: center; }
	.entry-content { font-size: 17px; }
	.entry-content h2 { font-size: 22px; }
	.lab-section { margin: 34px 0; }
	.lab-card__title { font-size: 18px; }
	.lab-card__cta { margin-left: 0; width: 100%; }
	.one-container .site-content { padding: 20px 0; }
	.single .inside-article, .page .inside-article { padding: 4px 16px 32px; }
}

/* Reserve space for future ad slots so they never push content (CLS) */
.lab-ad-slot { min-height: 280px; margin: 28px 0; }

/* Back to top */
.generate-back-to-top { background: var(--lab-ink); color: #fff; border-radius: 8px; width: 42px; height: 42px; line-height: 42px; opacity: .85; }
.generate-back-to-top:hover, .generate-back-to-top:focus { background: var(--lab-accent); color: #fff; opacity: 1; }

/* Comments aligned with article width */
.single .comments-area { max-width: 760px; margin: 0 auto; padding: 0 20px 40px; }
.comment-form input[type=text], .comment-form input[type=email], .comment-form input[type=url], .comment-form textarea { border-radius: 8px; border-color: var(--lab-line); background: var(--lab-surface); }
.comment-form .submit { background: var(--lab-ink); border-radius: 8px; }

/* Mobile header on one row */
@media (max-width: 768px) {
	.inside-header { flex-wrap: nowrap; padding-left: 16px; padding-right: 8px; }
	.site-branding { min-width: 0; }
	.main-title { font-size: 17px; }
	.has-inline-mobile-toggle .mobile-menu-control-wrapper { margin-left: auto; }
}

/* ==========================================================================
   Design v2 — "AI 자동매매 진화 일지" design system (option lab_design=v2).
   One set of components for every journal post: LIVE (A/B), RESEARCH, MONTHLY.
   Every rule targets markup that exists only in v2 or is scoped to .lab-design-v2.
   ========================================================================== */
:root {
	--lab-gain: #166534;          /* LIVE P&L gain: green (7.1:1 on white) — always shown with its "+" sign */
	--lab-loss: #b91c1c;          /* LIVE P&L loss: red (6.5:1 on white) — always shown with its "−" sign */
	--lab-flat: #5b6474;          /* zero / break-even: neutral grey (6.0:1 on white) */
	--lab-pending: #8a6a12;
	--lab-pending-soft: #fdf6e3;
	--lab-pending-line: #efdfae;
	--lab-reject: #5d6778;
	--lab-reject-soft: #eef0f3;
	--lab-cand: #1f6a52;
	--lab-cand-soft: #e8f4ef;
	--lab-r-card: 14px;
	--lab-r-sec: 12px;
	--lab-gap: 22px;
}
.lab-tone--gain .lab-num, .lab-tone--gain .lab-jhero__sub, .lab-tone--gain .lab-jcard__main span { color: var(--lab-gain); }
.lab-tone--loss .lab-num, .lab-tone--loss .lab-jhero__sub, .lab-tone--loss .lab-jcard__main span { color: var(--lab-loss); }
.lab-tone--flat .lab-num, .lab-tone--flat .lab-jhero__sub, .lab-tone--flat .lab-jcard__main span { color: var(--lab-flat); }
.lab-num { font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

/* Badges: kind (LIVE / RESEARCH / MONTHLY), chip, state pill */
.lab-kind { display: inline-block; font-family: var(--lab-mono); font-size: 11px; font-weight: 800; letter-spacing: .06em; padding: 2px 7px; border-radius: 4px; line-height: 1.6; vertical-align: 1px; margin-right: 4px; white-space: nowrap; }
.lab-kind--live { background: var(--lab-ink); color: #fff; }
.lab-kind--research { background: var(--lab-accent-soft); color: var(--lab-accent); border: 1px solid #c3d2ff; }
.lab-kind--monthly { background: var(--lab-bg); color: var(--lab-ink-2); border: 1px solid var(--lab-line); }
.lab-chip { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--lab-bg); border: 1px solid var(--lab-line); color: var(--lab-ink-2); white-space: nowrap; }
.lab-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; line-height: 1.5; white-space: nowrap; border: 1px solid transparent; }
.lab-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.lab-pill--pending { background: var(--lab-pending-soft); color: var(--lab-pending); border-color: var(--lab-pending-line); }
.lab-pill--pending .lab-dot { background: #d4a72c; }
.lab-pill--rejected { background: var(--lab-reject-soft); color: var(--lab-reject); border-color: #d6dae1; }
.lab-pill--candidate { background: var(--lab-cand-soft); color: var(--lab-cand); border-color: #bfdccf; }

/* Home hero (v2) */
.lab-hero--v2 h1 { max-width: 20em; }
.lab-hero__stages--loop li:last-child { color: #c9d6f5; border-color: rgba(143,176,255,.45); }
@media (max-width: 520px) { .lab-hero--v2 h1 br { display: none; } }

/* Journal posts: one title hierarchy, hero replaces the featured image (it stays the social image) */
.lab-design-v2.lab-journal-post .featured-image, .lab-design-v2.lab-journal-post .page-header-image-single { display: none; }
.lab-design-v2.lab-journal-post h1.entry-title { font-size: clamp(22px, 3.4vw, 32px); line-height: 1.35; letter-spacing: -0.01em; word-break: keep-all; overflow-wrap: anywhere; }
.lab-design-v2.lab-journal-post .entry-header { margin-bottom: 14px; }
.lab-design-v2.lab-journal-post .lab-toc summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.lab-design-v2.lab-journal-post .lab-toc summary::after { content: "펼쳐 보기 ▾"; margin-left: auto; font-size: 13px; font-weight: 600; color: var(--lab-accent); }
.lab-design-v2.lab-journal-post .lab-toc details[open] summary::after { content: "접기 ▴"; }

/* Hero (shared) */
.lab-jhero { background: var(--lab-surface); border: 1px solid var(--lab-line); border-radius: var(--lab-r-card); padding: 20px 20px 18px; margin: 0 0 28px; }
.lab-jhero__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.lab-jhero__kicker { font-size: 13px; font-weight: 800; letter-spacing: .03em; color: var(--lab-accent); }
.lab-jhero__date { margin: 6px 0 14px; font-size: 15px; font-weight: 600; color: var(--lab-ink-2); }
.lab-jhero__main { display: flex; flex-direction: column; gap: 2px; padding-bottom: 16px; border-bottom: 1px solid var(--lab-line); }
.lab-jhero__label { font-size: 14px; color: var(--lab-ink-3); }
.lab-jhero__label small { font-size: 12px; }
.lab-jhero__main .lab-num { font-size: clamp(38px, 9vw, 52px); line-height: 1.1; font-weight: 800; }
.lab-jhero__sub { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lab-jhero__sub small { font-size: 13px; font-weight: 500; color: var(--lab-ink-3); margin-left: 4px; }
.lab-jhero__topic { font-size: clamp(21px, 4.6vw, 26px); line-height: 1.4; font-weight: 800; word-break: keep-all; overflow-wrap: anywhere; }
.lab-jhero__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; list-style: none; margin: 16px 0 0; padding: 0; }
.lab-jhero__stats li { background: var(--lab-bg); border-radius: 10px; padding: 10px 12px; margin: 0; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lab-jhero__stats li:last-child { grid-column: 1 / -1; }
.lab-jhero__stats strong { font-size: 20px; font-variant-numeric: tabular-nums; line-height: 1.3; }
.lab-jhero__stats span { font-size: 13px; color: var(--lab-ink-3); }
.lab-jhero--monthly { padding-bottom: 8px; }
.lab-ai-status { margin-top: 12px; border: 1px solid var(--lab-pending-line); background: var(--lab-pending-soft); border-radius: 10px; padding: 12px 14px; }
.lab-ai-status__label { display: block; font-size: 12px; font-weight: 700; color: var(--lab-pending); letter-spacing: .03em; margin-bottom: 4px; }
.lab-ai-status p { margin: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.5; }
.lab-ai-status strong { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.lab-ai-status strong .lab-dot { background: #d4a72c; }
.lab-ai-status p > span { font-size: 14px; color: var(--lab-ink-2); }
@media (min-width: 700px) {
	.lab-jhero { padding: 26px 28px 24px; }
	.lab-jhero__stats { grid-template-columns: 1fr 1fr 2fr; }
	.lab-jhero__stats li:last-child { grid-column: auto; }
}

/* Section cards (shared) */
.lab-sec { background: var(--lab-surface); border: 1px solid var(--lab-line); border-radius: var(--lab-r-sec); padding: 4px 20px 20px; margin: var(--lab-gap) 0 0; min-width: 0; }
.lab-sec > h2:first-child { margin-top: .9em; }
.lab-sec > :last-child { margin-bottom: 0; }
.lab-sec__status { margin: 0 0 4px; }
.lab-sec__eyebrow { margin: 16px 0 0; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--lab-ink-3); }
.entry-content .lab-sec h2 { font-size: 21px; line-height: 1.4; }
.lab-sec--summary, .lab-sec--overview, .lab-sec--question { border-top: 3px solid var(--lab-accent); }
.lab-sec--ai, .lab-sec--verdict { border: 1px solid #c3d2ff; background: linear-gradient(180deg, var(--lab-accent-soft), var(--lab-surface) 140px); }
.lab-kind-research .lab-sec--fail { background: var(--lab-bg); border-style: dashed; }
.lab-prior { margin-top: 18px; border: 1px dashed #c9d0dc; border-radius: 10px; background: var(--lab-bg); padding: 12px 14px; }
.lab-prior__label { display: inline-block; font-size: 12px; font-weight: 700; color: var(--lab-ink-3); background: var(--lab-surface); border: 1px solid var(--lab-line); border-radius: 999px; padding: 1px 9px; margin-bottom: 6px; }
.lab-prior p, .lab-prior ul { font-size: 16px; color: var(--lab-ink-2); }
.lab-prior > :last-child { margin-bottom: 0; }

/* History card (version record) */
.lab-sec--version { border-left: 4px solid var(--lab-ink-2); }
.lab-sec--version ul { list-style: none; padding: 0; margin-left: 0; }
.lab-sec--version li { padding: 8px 0; border-bottom: 1px solid var(--lab-line); margin: 0; }
.lab-sec--version li:last-child { border-bottom: 0; }

/* Timeline (shared): vertical on phones, horizontal steps on wide screens */
.lab-flow { list-style: none; counter-reset: flow; margin: 14px 0 14px; padding: 0; position: relative; }
.lab-flow li { counter-increment: flow; position: relative; margin: 0; padding: 7px 0 7px 40px; font-weight: 600; font-size: 16px; line-height: 1.5; }
.lab-flow li::before { content: counter(flow); position: absolute; left: 0; top: 6px; width: 28px; height: 28px; border-radius: 50%; background: var(--lab-surface); border: 2px solid var(--lab-accent); color: var(--lab-accent); font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.lab-flow li + li::after { content: ""; position: absolute; left: 13px; top: -8px; height: 14px; border-left: 2px solid #c3d2ff; }
.lab-flow li:last-child::before { background: var(--lab-accent); color: #fff; }
.lab-flow__rule { margin-top: 14px; font-size: 15px; background: var(--lab-bg); border-radius: 8px; padding: 10px 12px; color: var(--lab-ink-2); }
@media (min-width: 1000px) {
	.lab-flow { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
	.lab-flow li { padding: 38px 0 0; text-align: center; font-size: 14px; }
	.lab-flow li::before { left: 50%; top: 0; transform: translateX(-50%); }
	.lab-flow li + li::after { left: calc(-50% + 18px); top: 14px; width: calc(100% - 36px + 8px); height: 0; border-left: 0; border-top: 2px solid #c3d2ff; }
}

/* Table scroller (shared): scrolls inside its card, first column stays readable */
.lab-design-v2 .entry-content .wp-block-table { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-left: 0; margin-right: 0; max-width: 100%; }
.lab-design-v2 .entry-content .wp-block-table table { min-width: 560px; border-collapse: separate; border-spacing: 0; font-size: 15px; font-variant-numeric: tabular-nums; }
.lab-design-v2 .entry-content .wp-block-table th, .lab-design-v2 .entry-content .wp-block-table td { white-space: nowrap; padding: 8px 10px; border: 0; border-bottom: 1px solid var(--lab-line); }
.lab-design-v2 .entry-content .wp-block-table thead th { background: var(--lab-bg); font-size: 13px; color: var(--lab-ink-2); }
.lab-design-v2 .entry-content .wp-block-table th:first-child, .lab-design-v2 .entry-content .wp-block-table td:first-child { position: sticky; left: 0; background: var(--lab-surface); z-index: 1; box-shadow: 1px 0 0 var(--lab-line); white-space: normal; min-width: 7.5em; max-width: 10em; }
.lab-design-v2 .entry-content .wp-block-table thead th:first-child { background: var(--lab-bg); }

/* List cards (one family; badge tells LIVE / RESEARCH / MONTHLY apart) */
.lab-jcard .lab-card__link { padding: 18px 18px 16px; gap: 4px; }
.lab-jcard__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.lab-jcard__kicker { font-size: 13px; font-weight: 800; color: var(--lab-accent); letter-spacing: .02em; }
.lab-jcard__date { font-size: 14px; color: var(--lab-ink-3); font-weight: 600; }
.lab-jcard__main { margin: 6px 0 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.lab-jcard__main .lab-num { font-size: 32px; font-weight: 800; line-height: 1.15; }
.lab-jcard__main span { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lab-jcard__main--topic { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 20px; font-weight: 800; line-height: 1.4; word-break: keep-all; }
.lab-jcard__meta { margin: 2px 0 0; font-size: 14px; color: var(--lab-ink-2); font-variant-numeric: tabular-nums; }
.lab-jcard__status { margin: 8px 0 0; }
.lab-jcard__tag { margin: 8px 0 0; font-size: 15px; line-height: 1.55; color: var(--lab-ink); font-weight: 600; }
.lab-jcard__cta { margin-top: auto; padding-top: 12px; color: var(--lab-accent); font-weight: 700; font-size: 14px; min-height: 24px; }
.lab-jcard:hover .lab-jcard__cta { text-decoration: underline; }

/* Research journal (v16): 30-second summary, plain-Korean state, uncertain/failed sections */
.lab-jhero__summary { padding: 14px 0 4px; }
.lab-jhero__summary p { margin: 4px 0 0; font-size: 17px; line-height: 1.6; font-weight: 600; }
.lab-jhero__facts { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.lab-jhero__facts li { margin: 0; background: var(--lab-bg); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.lab-jhero__facts span { font-size: 12px; font-weight: 700; color: var(--lab-ink-3); letter-spacing: .02em; }
.lab-jhero__facts strong { font-size: 16px; line-height: 1.45; }
.lab-jhero__facts small { font-size: 13px; color: var(--lab-ink-2); line-height: 1.5; }
@media (min-width: 700px) { .lab-jhero__facts { grid-template-columns: 1fr 1fr; } }
/* the hero already shows the 30-second summary, state and one-line result; REST/feeds keep the body copies */
.lab-design-v2.lab-kind-research .entry-content > p.lab-research-summary, .lab-design-v2.lab-kind-research .entry-content > p.lab-research-state,
.lab-design-v2.lab-kind-research .entry-content > p.lab-research-outcome { display: none; }
.lab-kind-research .entry-content > p.lab-research-summary { background: var(--lab-surface); border: 1px solid var(--lab-line); border-top: 3px solid var(--lab-accent); border-radius: var(--lab-r-sec); padding: 16px 20px; font-size: 17px; }
.lab-kind-research .entry-content > p.lab-research-state, .lab-kind-research .entry-content > p.lab-research-outcome,
.lab-kind-research .entry-content > p.lab-research-evidence { margin: 8px 0 0; font-size: 15px; color: var(--lab-ink-2); padding: 0 4px; }
.lab-sec--undetermined { background: var(--lab-pending-soft); border: 1px dashed var(--lab-pending-line); }
.lab-sec--numbers .lab-note, .lab-sec .lab-note { font-size: 14px; color: var(--lab-ink-3); }
/* two-column numbers table: no sticky column, label wraps, value stays visible on the right */
.lab-design-v2 .entry-content .lab-sec--numbers .wp-block-table table { min-width: 0; width: 100%; }
.lab-design-v2 .entry-content .lab-sec--numbers .wp-block-table th:first-child, .lab-design-v2 .entry-content .lab-sec--numbers .wp-block-table td:first-child {
	position: static; box-shadow: none; white-space: normal; min-width: 0; max-width: none; }
.lab-design-v2 .entry-content .lab-sec--numbers .wp-block-table td:last-child, .lab-design-v2 .entry-content .lab-sec--numbers .wp-block-table th:last-child {
	text-align: right; white-space: nowrap; font-weight: 700; width: 1%; }
.lab-principle { background: var(--lab-bg); border-radius: 8px; padding: 10px 12px; font-size: 15px; color: var(--lab-ink-2); }

/* v16.7 research outline: intro, numbers table readability, table caption */
.lab-kind-research .entry-content > p.lab-research-intro { font-size: 17px; line-height: 1.75; color: var(--lab-ink); margin: 0 0 6px; }
.lab-design-v2 .entry-content .lab-sec--result .wp-block-table table { min-width: 0; width: 100%; }
.lab-design-v2 .entry-content .lab-sec--result .wp-block-table th:first-child, .lab-design-v2 .entry-content .lab-sec--result .wp-block-table td:first-child {
	position: static; box-shadow: none; white-space: normal; min-width: 0; max-width: none; }
.lab-design-v2 .entry-content .lab-sec--result .wp-block-table td:last-child, .lab-design-v2 .entry-content .lab-sec--result .wp-block-table th:last-child {
	text-align: right; white-space: nowrap; font-weight: 700; width: 1%; }
.lab-design-v2 .entry-content .lab-sec--result .wp-block-table tbody tr:nth-child(even) td { background: var(--lab-bg); }
.lab-sec p.lab-table-caption { font-size: 13px; color: var(--lab-ink-3); margin-top: 6px; }
.lab-sec--summary ul, .lab-sec--method ul, .lab-sec--record ul { list-style: none; padding: 0; margin-left: 0; }
.lab-sec--summary li, .lab-sec--method li, .lab-sec--record li { padding: 7px 0; border-bottom: 1px solid var(--lab-line); margin: 0; }
.lab-sec--summary li:last-child, .lab-sec--method li:last-child, .lab-sec--record li:last-child { border-bottom: 0; }

/* LIVE journal body: signed amounts — gain muted red, loss muted blue (same tokens as the hero/cards) */
.lab-amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lab-amt--gain { color: var(--lab-gain); }
.lab-amt--loss { color: var(--lab-loss); }
.lab-amt--flat { color: var(--lab-flat); font-weight: 600; }

@media (max-width: 420px) {
	.lab-sec { padding: 2px 14px 16px; border-radius: 10px; }
	.lab-jhero { padding: 16px 16px 14px; }
	.lab-jhero__stats strong { font-size: 18px; }
	.entry-content .lab-sec h2 { font-size: 20px; }
}

/* ---------- Mobile fine-tuning (home): shorter hero, tighter section rhythm — same colours, fonts and layout ---------- */
@media (max-width: 768px) {
	.lab-hero--v2 { padding: 34px 0 30px; }                     /* was 40 / 36 */
	.lab-hero--v2 .lab-hero__eyebrow { margin-bottom: 10px; }   /* was 14 */
	.lab-hero--v2 h1 { margin-bottom: 12px; }                   /* was 16 */
	.lab-hero--v2 .lab-hero__sub { margin-bottom: 20px; }       /* was 28; body line-height unchanged */
	.lab-hero--v2 .lab-hero__cta { margin-bottom: 14px; gap: 10px; }
	.home .lab-section { margin: 28px 0; }                      /* was 34 */
	.home .lab-section__head { margin-bottom: 12px; }           /* was 16 */
	.lab-jcard .lab-chip { min-height: 28px; display: inline-flex; align-items: center; }  /* same height as the state pill */
}
@media (max-width: 520px) {
	.lab-hero--v2 h1 { line-height: 1.2; }                      /* was 1.25 — font size unchanged */
}

/* LIVE: owner-added account proof image */
.lab-proof { margin: 12px 0 0; }
.lab-proof img, .lab-proof__img { display: block; max-width: 100%; height: auto; border: 1px solid var(--lab-line, #e5e7eb); border-radius: 10px; }
.lab-proof figcaption { margin-top: 8px; font-size: .9rem; color: var(--lab-flat, #5b6474); }
.lab-proof__lead { color: var(--lab-flat, #5b6474); font-size: .95rem; }

/* single posts: author box */
.lab-author { display: flex; gap: 16px; align-items: flex-start; margin: 32px 0 16px; padding: 18px 20px; border: 1px solid var(--lab-line, #e5e7eb); border-radius: 12px; background: #f8fafc; }
.lab-author__avatar { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 12px; background: #0b1220; color: #fff; font: 700 26px/48px var(--lab-mono, monospace); text-align: center; box-shadow: inset 0 -4px 0 #2350d8; }
.lab-author__body p { margin: 0 0 6px; }
.lab-author__name { font-weight: 700; font-size: .95rem; }
.lab-author__bio { font-size: .92rem; color: #374151; line-height: 1.65; }
.lab-author__links { font-size: .88rem; margin-bottom: 0 !important; }
@media (max-width: 480px) { .lab-author { padding: 16px; gap: 12px; } .lab-author__avatar { flex-basis: 40px; width: 40px; height: 40px; font-size: 22px; line-height: 40px; } }
/* keep absolutely positioned screen-reader labels (수익/손실/본전) inside the scrolling table box, so the page never scrolls sideways */
.entry-content .wp-block-table { position: relative; }
