/**
 * WSDC condition (concern) page styles.
 *
 * Loaded on template-conditions.php on top of main.css and treatment.css.
 * Most of the page reuses the .td-* treatment classes; this file only adds
 * the condition-specific pieces: the dual author/reviewer byline, the
 * symptoms checklist, and the clinician bio box.
 *
 * @package wsdc
 */

/* Sticky-header scroll offset for in-page anchors. */
#symptoms,
#causes,
#treatments,
#faqs,
#before-after { scroll-margin-top: 120px; }

/* ── Authorship: two-part byline (author + reviewer) ─────────────────── */
.cond-author-sec { padding-block: var(--s-4); }
.cond-authorline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: .6rem 1.4rem;
	font-size: .85rem;
	color: var(--ink-muted);
	margin: 0;
	text-align: left;
}
.cond-authorline__people {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .6rem 1.1rem;
}
.cond-authorline__pair {
	display: flex;
	flex-direction: column;
	line-height: 1.25;
	margin-inline-end: .2rem;
}
.cond-authorline__lead {
	font-size: .75rem;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--ink-muted);
	opacity: .85;
}
.cond-authorline__pair a { color: var(--ink); text-decoration: none; }
.cond-authorline__pair a b { font-weight: 600; }
.cond-authorline__pair a { border-bottom: 1px solid transparent; transition: border-color .2s var(--ease); }
.cond-authorline__pair a:hover { border-bottom-color: var(--barley); }
.cond-authorline__meta { display: flex; align-items: center; gap: .5rem .85rem; flex-wrap: wrap; }
.cond-authorline__meta b { color: var(--ink); font-weight: 600; }
.cond-authorline__meta a { color: var(--barley-dark); font-weight: 600; text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .2s var(--ease); }
.cond-authorline__meta a:hover { border-bottom-color: currentColor; }

/* ── Signs and symptoms checklist ───────────────────────────────────── */
.cond-symptoms { padding-block: var(--section-y); }
.cond-symptoms__grid {
	display: grid;
	grid-template-columns: 1.05fr .95fr;
	gap: clamp(2rem, 1rem + 4vw, 5rem);
	align-items: center;
}
.cond-symptoms__copy h2 { font-size: var(--fs-h2); margin: 0 0 var(--s-3); }
.cond-symptoms__sub { color: var(--ink-muted); max-width: 48ch; margin: 0 0 var(--s-4); }
.cond-symptoms__list {
	list-style: none;
	margin: 0 0 var(--s-4);
	padding: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--s-3) var(--s-4);
}
.cond-symptoms__list li {
	display: flex;
	align-items: flex-start;
	gap: .65rem;
	font-size: .95rem;
	line-height: 1.4;
	color: var(--ink);
}
.cond-symptoms__list li svg {
	width: 20px;
	height: 20px;
	flex: none;
	margin-top: 1px;
	color: var(--barley);
}
.cond-symptoms__note {
	font-size: .9rem;
	color: var(--ink-muted);
	margin: 0 0 var(--s-4);
	font-style: italic;
}
.cond-symptoms__media {
	position: relative;
	overflow: hidden;
	border-radius: var(--radius);
	background: var(--mirage);
	aspect-ratio: 4 / 5;
}
.cond-symptoms__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── Text-heavy article with sticky TOC sidebar ─────────────────────── */
.cond-article { padding-block: var(--section-y); }
.cond-article__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 280px;
	gap: clamp(2rem, 1.25rem + 3vw, 3.5rem);
	align-items: start;
	max-width: 1280px;
	margin: 0 auto;
}
.cond-article__grid--single { grid-template-columns: minmax(0, 860px); justify-content: center; }

/* Article prose. Headings on the white body sit in bronze (Sean, 9 Oct 2026). */
.cond-article__body { max-width: none; }
.cond-article__lead {
	font-size: var(--fs-lead);
	line-height: 1.6;
	color: var(--ink);
	margin: 0 0 var(--s-5);
}
.cond-article__body h2 {
	font-family: var(--font-display);
	font-weight: 500;
	font-size: var(--fs-h2);
	line-height: 1.15;
	color: var(--barley-dark);
	margin: var(--s-7) 0 var(--s-3);
	scroll-margin-top: 120px;
}
.cond-article__body h2:first-child,
.cond-article__lead + h2 { margin-top: 0; }
.cond-article__body h3 {
	font-family: var(--font-body);
	font-weight: 600;
	font-size: 1.15rem;
	color: var(--barley-dark);
	margin: var(--s-5) 0 var(--s-2);
	scroll-margin-top: 120px;
}
.cond-article__body h4,
.cond-article__body h5 {
	font-family: var(--font-body);
	font-weight: 600;
	font-size: 1rem;
	color: var(--barley-dark);
	margin: var(--s-4) 0 var(--s-2);
	scroll-margin-top: 120px;
}
.cond-article__body p {
	font-size: var(--fs-body);
	line-height: 1.75;
	color: var(--ink-muted);
	margin: 0 0 var(--s-4);
}
.cond-article__body ul,
.cond-article__body ol {
	margin: 0 0 var(--s-4);
	padding-left: 1.25rem;
	color: var(--ink-muted);
	line-height: 1.7;
}
.cond-article__body li { margin-bottom: .4rem; }
.cond-article__body a {
	color: var(--barley-dark);
	font-weight: 600;
	text-decoration: none;
	border-bottom: 1px solid rgba(143,114,82,.4);
	transition: border-color .2s var(--ease);
}
.cond-article__body a:hover { border-bottom-color: var(--barley-dark); }

/* Sticky table of contents, presented as a clear panel */
.cond-aside { align-self: stretch; }
.cond-toc {
	position: sticky;
	top: 110px;
	font-family: var(--font-body);
	background: #fbf8f4;
	border: 1px solid var(--hairline);
	border-radius: var(--radius);
	padding: var(--s-4);
}
.cond-toc__label {
	font-size: var(--fs-eyebrow);
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--barley-dark);
	margin: 0 0 var(--s-3);
}
.cond-toc__list {
	list-style: none;
	margin: 0;
	padding: 0;
	border-left: 2px solid var(--hairline);
}
.cond-toc__item a {
	display: block;
	padding: .35rem 0 .35rem 1rem;
	margin-left: -2px;
	border-left: 2px solid transparent;
	font-size: .85rem;
	line-height: 1.35;
	color: var(--ink-muted);
	text-decoration: none;
	transition: color .2s var(--ease), border-color .2s var(--ease);
}
.cond-toc__item a:hover { color: var(--mirage); }
.cond-toc__item a.is-active {
	color: var(--mirage);
	font-weight: 600;
	border-left-color: var(--barley);
}
.cond-toc__item--l3 a { padding-left: 1.85rem; font-size: .82rem; }
.cond-toc__item--l4 a { padding-left: 2.7rem; font-size: .8rem; }
.cond-toc__item--l5 a { padding-left: 3.55rem; font-size: .8rem; }

/* ── Conditions landing: concern directory ──────────────────────────── */
.cl-directory { padding-block: var(--section-y); }
.cl-directory .td-head { margin-bottom: var(--s-6); }
/* The conditions finder reuses the fees finder component (ff-*) but carries no
   prices, so hide the empty price column in the typeahead suggestions. */
.cl-finder .ff-suggest__price:empty { display: none; }
.cl-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: clamp(1.25rem, .75rem + 1.5vw, 2rem);
	align-items: start;
}
.cl-card {
	display: flex;
	flex-direction: column;
	background: var(--white);
	border: 1px solid var(--hairline);
	border-radius: var(--radius);
	padding: var(--s-5);
	transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.cl-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 1px 2px rgba(28,42,58,.04), 0 16px 36px rgba(28,42,58,.09);
	border-color: rgba(164,134,98,.5);
}
.cl-card__icon {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: 1px solid var(--hairline);
	color: var(--barley);
	margin-bottom: var(--s-3);
}
.cl-card__icon svg { width: 24px; height: 24px; }
.cl-card__title {
	font-family: var(--font-display);
	font-weight: 500;
	font-size: 1.4rem;
	color: var(--mirage);
	margin: 0 0 .35rem;
}
.cl-card__intro {
	font-size: .9rem;
	color: var(--ink-muted);
	line-height: 1.5;
	margin: 0 0 var(--s-3);
	min-height: 2.7em;
}
.cl-card__list { list-style: none; margin: 0; padding: 0; }
.cl-card__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--s-3);
	padding: .8rem 0;
	border-top: 1px solid var(--hairline);
	font-size: .95rem;
	font-weight: 500;
	color: var(--mirage);
	text-decoration: none;
	transition: color .2s var(--ease);
}
.cl-card__link:hover { color: var(--barley-dark); }
.cl-card__chev {
	color: var(--barley);
	font-size: 1.2rem;
	line-height: 1;
	transition: transform .2s var(--ease);
}
.cl-card__link:hover .cl-card__chev { transform: translateX(3px); }

/* Conditions landing: helper band */
.cl-help { padding-block: var(--section-y); background: var(--cream); }
.cl-help__inner {
	display: grid;
	grid-template-columns: 1.4fr .9fr;
	gap: clamp(2rem, 1rem + 4vw, 5rem);
	align-items: center;
}
.cl-help__copy h2 { font-size: var(--fs-h2); margin: 0 0 var(--s-3); max-width: 22ch; }
.cl-help__copy p { color: var(--ink-muted); line-height: 1.7; margin: 0; max-width: 56ch; }
.cl-help__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* ── Author and reviewer bio box ────────────────────────────────────── */
.cond-authorbox { padding-block: var(--section-y); background: var(--white); }
.cond-authorbox .td-head { margin-bottom: var(--s-5); }
.cond-authorbox__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(1.5rem, 1rem + 2vw, 2.5rem);
	max-width: 960px;
	margin: 0 auto;
}
.cond-bio {
	display: grid;
	grid-template-columns: 96px 1fr;
	gap: var(--s-4);
	background: var(--white);
	border: 1px solid var(--hairline);
	border-radius: var(--radius);
	padding: var(--s-4);
	box-shadow: 0 1px 2px rgba(28,42,58,.04), 0 8px 24px rgba(28,42,58,.06);
}
.cond-bio__media {
	display: block;
	width: 96px;
	height: 96px;
	border-radius: 50%;
	overflow: hidden;
	background: var(--mirage);
}
.cond-bio__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; display: block; }
.cond-bio--no-photo { grid-template-columns: 1fr; }
.cond-bio__label {
	font-size: var(--fs-eyebrow);
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--barley-dark);
	margin: 0 0 .35rem;
}
.cond-bio__name { font-size: 1.2rem; margin: 0 0 .15rem; }
.cond-bio__name a { color: var(--ink); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .2s var(--ease); }
.cond-bio__name a:hover { border-bottom-color: var(--barley); }
.cond-bio__role { font-size: .85rem; color: var(--ink-muted); margin: 0 0 .3rem; }
.cond-bio__gdc { font-size: .78rem; color: var(--ink-muted); margin: 0 0 .5rem; letter-spacing: .02em; }
.cond-bio__creds { font-size: .82rem; color: var(--barley-dark); font-weight: 500; margin: 0 0 .6rem; }
.cond-bio__text { font-size: .9rem; color: var(--ink-muted); line-height: 1.55; margin: 0 0 .75rem; }

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 980px) {
	.cl-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
	.cl-help__inner { grid-template-columns: 1fr; }
	.cond-symptoms__grid { grid-template-columns: 1fr; }
	.cond-symptoms__media { aspect-ratio: 16 / 10; order: -1; }
	.cond-authorbox__grid { grid-template-columns: 1fr; max-width: 520px; }

	/* TOC moves above the article and stops being sticky. */
	.cond-article__grid { grid-template-columns: 1fr; gap: var(--s-5); }
	.cond-article__body { max-width: none; order: 2; }
	.cond-aside { order: 1; }
	.cond-toc {
		position: static;
		top: auto;
		background: var(--cream);
		border-radius: var(--radius-sm);
		padding: var(--s-4);
	}
	.cond-toc__list { border-left: 0; }
	.cond-toc__item a { padding-left: .75rem; border-left-width: 2px; }
	.cond-toc__item--l3 a { padding-left: 1.5rem; }
	.cond-toc__item--l4 a { padding-left: 2.25rem; }
	.cond-toc__item--l5 a { padding-left: 3rem; }
}

@media (max-width: 560px) {
	.cl-grid { grid-template-columns: 1fr; }
	.cl-help__actions .btn { flex: 1 1 auto; text-align: center; }
	.cond-symptoms__list { grid-template-columns: 1fr; }
	.cond-authorline { justify-content: flex-start; }

	/* Author row stacks on mobile: each avatar stays beside its own name, and
	   the dates sit on their own lines under a hairline. */
	.cond-authorline { flex-direction: column; align-items: stretch; gap: .9rem; }
	.cond-authorline__people {
		display: grid;
		grid-template-columns: 34px 1fr;
		align-items: center;
		gap: .75rem;
	}
	.cond-authorline__people .td-authorline__avatar { grid-column: 1; width: 34px; height: 34px; }
	.cond-authorline__pair { grid-column: 2; margin: 0; }
	.cond-authorline__meta {
		flex-direction: column;
		align-items: flex-start;
		gap: .2rem;
		padding-top: .8rem;
		border-top: 1px solid var(--hairline, rgba(28,42,58,.12));
	}
	.cond-authorline__meta .td-authorline__sep { display: none; }
	.cond-bio { grid-template-columns: 1fr; text-align: left; }
	.cond-bio__media { margin-bottom: var(--s-2); }
}

/* Condition FAQs (accordion) */
.cond-faq{padding-block:clamp(2rem,1.5rem + 2vw,3.5rem)}
.cond-faq__title{font-family:var(--font-display,Georgia,serif);font-size:clamp(1.5rem,1.2rem + 1.5vw,2.1rem);color:var(--barley-dark,#8f7252);margin:0 0 1.5rem}
.cond-faq__list{max-width:820px;display:grid;gap:.75rem}
.cond-faq__item{border:1px solid var(--hairline,rgba(28,42,58,.12));border-radius:10px;background:#fff;overflow:hidden}
.cond-faq__q{cursor:pointer;padding:1.1rem 1.3rem;font-family:var(--font-display,Georgia,serif);font-size:1.1rem;color:var(--mirage,#1C2A3A);list-style:none;display:flex;justify-content:space-between;align-items:center;gap:1rem}
.cond-faq__q::-webkit-details-marker{display:none}
.cond-faq__q::after{content:"+";font-size:1.4rem;color:var(--barley,#A48662);flex:none;line-height:1}
.cond-faq__item[open] .cond-faq__q::after{content:"\2212"}
.cond-faq__a{padding:0 1.3rem 1.2rem}
.cond-faq__a p{margin:0;font-size:.98rem;line-height:1.65;color:var(--ink,#1C2A3A)}

/* Related treatments (foot of condition page) */
.cond-related{padding-block:clamp(2rem,1.5rem + 2vw,3.5rem)}
.cond-related__title{font-family:var(--font-display);font-weight:500;font-size:var(--fs-h2,1.8rem);color:var(--barley-dark);margin:0 0 var(--s-4,1.5rem);text-align:center}
.cond-related__grid{display:grid;grid-template-columns:repeat(3,1fr);gap:clamp(1rem,.75rem + 1vw,1.5rem);max-width:1080px;margin:0 auto}
.cond-related__card{display:flex;flex-direction:column;background:var(--white,#fff);border:1px solid var(--hairline);border-radius:var(--radius,12px);overflow:hidden;transition:transform .25s var(--ease),box-shadow .25s var(--ease),border-color .25s var(--ease)}
.cond-related__card:hover{transform:translateY(-3px);box-shadow:0 16px 36px -22px rgba(28,42,58,.4);border-color:rgba(164,134,98,.5)}
.cond-related__media{display:block;aspect-ratio:4/3;overflow:hidden;background:rgba(28,42,58,.06)}
.cond-related__media img{width:100%;height:100%;object-fit:cover;display:block}
.cond-related__name{padding:1rem 1.2rem;font-family:var(--font-display);font-size:1.15rem;color:var(--mirage)}
@media (max-width:760px){.cond-related__grid{grid-template-columns:1fr}}

/* In-content supporting image, breaks up the article -------------------------- */
.cond-article__figure{margin:var(--s-6) 0}
.cond-article__figure img{width:100%;height:auto;display:block;border-radius:var(--radius);aspect-ratio:16/9;object-fit:cover;box-shadow:0 18px 40px -28px rgba(28,42,58,.4)}
.cond-article__figure--wide img{aspect-ratio:auto;object-fit:contain}
.cond-article__figure figcaption{font-size:.85rem;color:var(--ink-muted);margin-top:.6rem;font-style:italic}

/* Explainer video (vertical YouTube short) in the sidebar, above the contents */
.cond-aside__video { margin-bottom: var(--s-5); }
.cond-aside__video-label {
	display: flex; align-items: center;
	font-size: var(--fs-eyebrow); font-weight: 600; letter-spacing: .16em;
	text-transform: uppercase; color: var(--barley-dark); margin: 0 0 var(--s-3);
}
.cond-aside__player {
	position: relative; aspect-ratio: 9 / 16;
	border-radius: var(--radius); overflow: hidden; background: #000;
	box-shadow: 0 20px 44px -28px rgba(28,42,58,.5);
}
.cond-aside__player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cond-aside__video-cap { font-size: .92rem; line-height: 1.4; color: var(--mirage); font-weight: 500; margin: var(--s-3) 0 0; }
/* On narrow screens the aside stacks above the article; keep the player tidy. */
@media (max-width: 900px) {
	.cond-aside__video { max-width: 320px; }
}
