/* LAB archive and detail only. Shared typography, colors and width come from base.css. */
.lab-page { overflow-wrap: anywhere; line-break: strict; }
.lab-intro { padding-block: 64px; color: var(--foredoom-color-white); background: var(--foredoom-color-navy); }
.lab-eyebrow { font-size: 12px; letter-spacing: .12em; }
.lab-intro .lab-eyebrow { color: var(--foredoom-color-yellow); }
.lab-intro h1 { color: inherit; font-size: clamp(40px, 6vw, 64px); }
.lab-lead { font-size: clamp(24px, 3vw, 36px); line-height: 1.6; }
.lab-intro p:last-child { margin-bottom: 0; max-width: 48em; }
.lab-list { padding-block: 56px; }
.lab-list__title { font-size: 22px; margin-bottom: 32px; }
.lab-grid { display: grid; gap: 48px 32px; }
.lab-card { display: flex; flex-direction: column; min-width: 0; border-top: 1px solid var(--foredoom-color-border); padding-top: 24px; }
.lab-card__image { display: block; margin-bottom: 24px; background: var(--foredoom-color-surface); }
.lab-card__image img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.lab-card__read { align-self: flex-start; margin-top: auto; padding-top: 12px; text-underline-offset: 5px; }
.lab-card h3 { font-size: 23px; line-height: 1.6; margin-block: 20px 16px; }
.lab-card h3 a { text-decoration-thickness: 1px; text-underline-offset: 5px; }
.lab-card h3 a:hover, .lab-back a:hover { text-decoration-color: var(--foredoom-color-yellow); }
.lab-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; font-size: 12px; }
.lab-status { border: 1px solid var(--foredoom-color-navy); padding: 3px 8px; color: var(--foredoom-color-navy); }
.lab-topics { display: flex; flex-wrap: wrap; gap: 6px 12px; list-style: none; margin: 0; padding: 0; }
.lab-topics li + li::before { content: '/'; color: #8a7000; margin-right: 12px; }
.lab-summary { line-height: 1.9; }
.lab-date { display: flex; flex-wrap: wrap; gap: 8px 24px; color: #53646b; font-size: 12px; }
.lab-empty { padding-block: 32px; }
.lab-detail { padding-bottom: 64px; }
.lab-detail__header { padding-block: clamp(56px, 9vw, 112px); margin-bottom: 56px; background: var(--foredoom-color-navy); color: var(--foredoom-color-white); }
.lab-detail__heading { max-width: 1040px; }
.lab-detail__header .lab-eyebrow { display: flex; flex-wrap: wrap; gap: 12px 24px; color: var(--foredoom-color-yellow); margin-bottom: 32px; }
.lab-detail__header .lab-eyebrow a { text-decoration: none; }
.lab-record-id { color: #b7c3d6; letter-spacing: .1em; }
.lab-detail h1 { max-width: 21em; color: inherit; font-size: clamp(29px, 4.2vw, 52px); line-height: 1.55; letter-spacing: .025em; margin: 0 0 24px; word-break: normal; overflow-wrap: anywhere; text-wrap: balance; }
.lab-detail__header .lab-summary { max-width: 48em; font-size: clamp(15px, 1.7vw, 19px); line-height: 1.9; color: #d8dfeb; margin-bottom: 32px; }
.lab-detail__header .lab-date { color: #b7c3d6; margin-bottom: 20px; }
.lab-detail__header .lab-status { color: var(--foredoom-color-yellow); border-color: #81742c; }
.lab-detail__header .lab-topics li + li::before { color: var(--foredoom-color-yellow); }
.lab-detail__content { max-width: 780px; }
.lab-detail__image { margin-bottom: 40px; }
.lab-detail__image img { width: 100%; height: auto; }
.lab-body { font-size: 16px; line-height: 2; word-break: normal; overflow-wrap: anywhere; counter-reset: lab-section; }
.lab-body p { margin-bottom: 1.55em; }
.lab-body strong { color: var(--foredoom-color-navy); font-weight: 700; }
.lab-body h2, .lab-body h3, .lab-body h4 { line-height: 1.65; text-wrap: pretty; }
.lab-body h2 { font-size: clamp(23px, 2.7vw, 30px); margin: 72px 0 28px; }
.lab-body h3 { font-size: 21px; margin: 40px 0 20px; }
/* Opt-in editorial heading: number is presentation, not stored article text. */
.lab-body h2.lab-section-heading { counter-increment: lab-section; border-top: 1px solid var(--foredoom-color-border); padding-top: 24px; }
.lab-section-heading .lab-section-label { display: block; color: #786100; font-family: var(--foredoom-font-heading); font-size: 12px; font-weight: 400; letter-spacing: .13em; margin-bottom: 14px; }
.lab-section-heading .lab-section-label::before { content: counter(lab-section, decimal-leading-zero) " / "; }
.lab-body .lab-record-title { margin-top: 72px; padding-top: 24px; border-top: 3px solid var(--foredoom-color-yellow); font-size: 21px; }
.lab-body .lab-experiment-record { margin-block: 24px 48px; background: var(--foredoom-color-surface); border: 1px solid var(--foredoom-color-border); }
.lab-experiment-record table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 14px; line-height: 1.9; }
.lab-experiment-record th, .lab-experiment-record td { text-align: left; vertical-align: top; padding: 18px 20px; border-bottom: 1px solid var(--foredoom-color-border); }
.lab-experiment-record th, .lab-experiment-record td:first-child { width: 29%; color: var(--foredoom-color-navy); font-weight: 600; }
.lab-experiment-record tr:last-child > * { border-bottom: 0; }
.lab-body .lab-update-log { list-style: none; padding: 0; margin-block: 24px 0; }
.lab-update-log li { position: relative; display: grid; gap: 8px; margin: 0; padding: 0 0 28px 24px; border-left: 1px solid var(--foredoom-color-border); font-size: 14px; }
.lab-update-log li::before { content: ""; position: absolute; left: -4px; top: .65em; width: 7px; height: 7px; background: #8a7000; }
.lab-update-log li:last-child { padding-bottom: 0; }
.lab-update-log strong { font-family: var(--foredoom-font-heading); }
.lab-body figure { max-width: 100%; margin-inline: 0; }
.lab-body pre, .lab-body .wp-block-table { max-width: 100%; overflow-x: auto; }
.lab-body pre { padding: 20px; background: var(--foredoom-color-surface); }
.lab-body blockquote { margin-inline: 0; padding-left: 20px; border-left: 3px solid var(--foredoom-color-yellow); }
.lab-body iframe, .lab-body video { max-width: 100%; }
.lab-back { border-top: 1px solid var(--foredoom-color-border); margin-top: 48px; padding-top: 24px; }
.lab-page .posts-navigation { margin-top: 40px; }
.lab-page .nav-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
@supports (word-break: auto-phrase) {
	.lab-detail h1, .lab-body h2 { word-break: auto-phrase; }
}
@media (min-width: 768px) {
	.lab-intro { padding-block: 88px; }
	.lab-list { padding-block: 80px; }
	.lab-detail { padding-bottom: 96px; }
	.lab-detail__header { margin-bottom: 80px; }
	.lab-body { font-size: 17px; line-height: 2.05; }
	.lab-body h2 { margin-top: 96px; }
	.lab-update-log li { grid-template-columns: 150px minmax(0, 1fr); gap: 24px; }
	.lab-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
}
@media (max-width: 479px) {
	.lab-experiment-record th, .lab-experiment-record td { display: block; width: 100%; padding: 12px 18px; }
	.lab-experiment-record th, .lab-experiment-record td:first-child { width: 100%; border-bottom: 0; padding-bottom: 0; }
	.lab-experiment-record tr { display: block; }
	.lab-experiment-record tr:last-child td { border-bottom: 0; }
}
