/* single.css - the article body (Blog post artboards: co-authored and medically
   reviewed). The header, byline, side column, credit card and related grid are
   inner.css components; this file styles what writers produce in Gutenberg -
   the core blocks the editor allows - plus the article header, byline, side
   column and credit card. Loaded after inner.css on posts only. */

.in-prose { display: flex; flex-direction: column; gap: 18px; max-width: 72ch; font-size: 1.0625rem; line-height: 1.7; color: var(--dd-text); }
.in-prose > * { margin: 0; }
.in-prose a { color: var(--dd-green-accent); text-underline-offset: 3px; }
/* Hover: the link turns ink, so the change is visible (both are otherwise the
   same green). Bold and italic inside a link keep the link's colour. */
.in-prose a:hover { color: var(--dd-ink); }
.in-prose a strong, .in-prose a em { color: inherit; }
.in-prose strong { font-weight: 600; color: var(--dd-ink); }
.in-prose > h2 { margin-top: 18px; font-size: clamp(1.625rem,2.4vw,2rem); line-height: 1.15; letter-spacing: -.03em; color: var(--dd-ink); scroll-margin-top: 96px; }
.in-prose > h3 { margin-top: 8px; font-size: 1.25rem; letter-spacing: -.02em; line-height: 1.25; color: var(--dd-ink); }
.in-prose ul, .in-prose ol { padding: 0 0 0 20px; display: flex; flex-direction: column; gap: 6px; }
/* base.css drops markers on ul[class] / ol[class]; Gutenberg lists carry .wp-block-list. */
.in-prose ul { list-style: disc; }
.in-prose ol { list-style: decimal; }

/* At a glance / any boxed group: core/group with the "Box" style or class. */
.in-prose .in-glancebox, .in-prose .is-style-box { background: var(--dd-bg-warm); border: 1px solid var(--dd-hairline-card); border-radius: 10px; padding: 20px 24px; display: flex; flex-direction: column; gap: 10px; }
.in-glancebox__label { font-size: 0.8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--dd-green-accent); }
.in-glancebox ul { margin: 0; font-size: 0.96875rem; line-height: 1.6; }
.in-glancebox p { margin: 0; }

/* Emergency box (dark). */
.in-prose .in-alert { background: var(--dd-green); color: var(--dd-white); border-radius: 10px; padding: 22px 26px; display: flex; flex-direction: column; gap: 10px; font-size: 0.96875rem; line-height: 1.6; }
.in-alert__title { font-size: 1.0625rem; font-weight: 500; letter-spacing: -.01em; color: var(--dd-white); }
.in-prose .in-alert strong { color: var(--dd-white); font-weight: 500; }
.in-alert ul { margin: 0; color: var(--dd-on-dark-light); }
.in-alert p { margin: 6px 0 0; font-size: 0.90625rem; color: var(--dd-on-dark); }
.in-prose .in-alert a { color: var(--dd-white); }

/* In-article call box: light (default) or dark. */
.in-prose .in-callout { background: var(--dd-green-light); border-radius: 10px; padding: clamp(22px,2.5vw,30px); display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; }
.in-callout__text { display: flex; flex-direction: column; gap: 6px; max-width: 46ch; }
.in-prose .in-callout__title { font-size: 1.1875rem; font-weight: 500; letter-spacing: -.02em; line-height: 1.25; color: var(--dd-ink); }
.in-callout__sub { font-size: 0.90625rem; color: var(--dd-ink); line-height: 1.5; }
.in-callout__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.in-prose .in-callout__btns a { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 18px; border-radius: 8px; font-size: 0.90625rem; font-weight: 600; text-decoration: none; background: var(--dd-white); color: var(--dd-ink); border: 1px solid var(--dd-ink-a14); box-sizing: border-box; }
.in-prose .in-callout__btns a:first-child { background: var(--dd-gold); border-color: var(--dd-gold); }
.in-prose .in-callout--dark { background: var(--dd-green); color: var(--dd-white); }
.in-prose .in-callout--dark .in-callout__title { color: var(--dd-white); }
.in-callout--dark .in-callout__sub { color: var(--dd-on-dark); }
.in-prose .in-callout--dark .in-callout__btns a:not(:first-child) { background: transparent; color: var(--dd-white); border-color: var(--dd-white-a35); }

/* Tables (core/table): the shared table style lives in general.css. */

/* Summary box: the Summary add-on, first thing in the article column. It
   replaces the old larger first paragraph - every paragraph is body size. */
.in-summary { background: var(--dd-green-light); border-radius: 10px; padding: 20px 24px; display: flex; flex-direction: column; gap: 8px; }
.in-summary__label { margin: 0; font-size: 0.8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--dd-green-accent); }
.in-summary__text { margin: 0; font-size: 1.0625rem; line-height: 1.6; color: var(--dd-ink); }

/* Images in the text (core/image). The rule for every in-article image:
   - landscape 16:9, at least 1600 x 900 (the column is ~730 px, so 1600
     covers 2x screens); inserted at "Full Size". The frame is always 16:9
     (about 410 px tall): a 3:2 or 4:3 photo is cropped top and bottom from
     the centre, so keep the subject in the middle;
   - full column width, rounded like every other photo on the site;
   - caption below, left-aligned, small and muted; one sentence that says
     what the photo shows, not a repeat of the alt text.
   Alignment, wide and full options are not used inside the article column. */
.in-prose .wp-block-image { margin: 8px 0; }
.in-prose .wp-block-image img { display: block; width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; border-radius: 10px; }
.in-prose .wp-block-image figcaption, .in-prose .wp-block-image .wp-element-caption { margin: 10px 0 0; font-size: 0.875rem; line-height: 1.5; color: var(--dd-text); text-align: left; }
.in-prose figcaption { margin-top: 8px; font-size: 0.875rem; color: var(--dd-text); }
.in-prose .wp-block-quote { padding: 8px 0 8px 20px; border-left: 4px solid var(--dd-green-accent); font-style: italic; }
.in-prose .wp-block-quote cite { display: block; margin-top: 8px; font-size: 0.875rem; font-style: normal; }
.in-prose .wp-block-separator { border: 0; border-top: 1px solid var(--dd-hairline); }
.in-prose .wp-block-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.in-prose .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.in-prose .wp-block-button__link { display: inline-flex; align-items: center; min-height: 46px; padding: 0 18px; border-radius: 8px; background: var(--dd-gold); color: var(--dd-ink); font-size: 0.90625rem; font-weight: 600; text-decoration: none; }

/* FAQ list ([dd_faq] or after the body) - questions from the FAQ add-on. */
.in-faqlist { border: 1px solid var(--dd-hairline); border-radius: 10px; overflow: hidden; font-size: 1rem; }
.in-faqlist__item { padding: 18px 22px; display: flex; flex-direction: column; gap: 6px; }
.in-faqlist__item + .in-faqlist__item { border-top: 1px solid var(--dd-hairline-card); }
.in-prose .in-faqlist__q { margin: 0; font-size: 1.125rem; letter-spacing: -.01em; line-height: 1.4; color: var(--dd-ink); }
.in-faqlist__a { font-size: 0.96875rem; line-height: 1.6; }
.in-faqlist__a p { margin: 0; }

/* Sources and disclaimer. */
.in-sources { margin-top: 12px; padding-top: 22px; border-top: 1px solid var(--dd-hairline); display: flex; flex-direction: column; gap: 10px; }
/* Two classes: the design's global h2 overrides at 1200/1500 would turn this
   14px label into a 36px heading; the export has that bug, the theme does not. */
.in-sources .in-sources__title { margin: 0; font-size: 0.875rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--dd-green-accent); }
.in-sources ol { margin: 0; padding: 0 0 0 22px; font-size: 0.875rem; line-height: 1.55; color: var(--dd-text); display: flex; flex-direction: column; gap: 5px; }
.in-sources ol a { word-break: break-all; }
.in-disclaimer { margin: 6px 0 0; font-size: 0.8125rem; line-height: 1.55; color: var(--dd-text); }
.in-disclaimer p { margin: 0; }


/* Note before the article (light green, info icon). */
.in-prose .in-note { background: var(--dd-green-light); border-radius: 10px; padding: 18px 22px; display: flex; gap: 14px; align-items: flex-start; font-size: 0.9375rem; line-height: 1.55; color: var(--dd-ink); }
.in-note__icon { width: 32px; height: 32px; border-radius: 6px; background: var(--dd-white); color: var(--dd-green); display: flex; align-items: center; justify-content: center; flex: none; }
.in-prose .in-note a { color: var(--dd-ink); }

/* 13. Article: header, byline, layout, side, credit card ------------------- */

.in-posthead { padding-top: 36px; display: flex; flex-direction: column; gap: 18px; }
.in-posthead__main { display: flex; flex-direction: column; gap: 16px; max-width: 860px; }
.in-posthead__top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.in-posthead__read { font-size: 0.8125rem; color: var(--dd-text); }
.in-posthead .in-post__title { margin: 0; font-size: clamp(2rem,3.8vw,3.25rem); line-height: 1.05; letter-spacing: -.04em; text-wrap: balance; }
.in-posthead__dek { margin: 0; font-size: 1.0625rem; line-height: 1.5; color: var(--dd-text); max-width: 60ch; }
.in-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; padding: 18px 0 24px; border-top: 1px solid var(--dd-hairline-card); }
.in-byline__person { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.in-byline__img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; object-position: center top; flex: none; }
.in-byline__org { width: 44px; height: 44px; border-radius: 8px; background: var(--dd-green); display: flex; align-items: center; justify-content: center; flex: none; }
.in-byline__org img { width: 36px; height: 15px; object-fit: cover; filter: brightness(0) invert(1); }
.in-byline__text { display: flex; flex-direction: column; line-height: 1.3; }
.in-byline__label { font-size: 0.75rem; font-weight: 600; color: var(--dd-green-accent); display: inline-flex; align-items: center; gap: 5px; }
.in-byline__name { font-size: 0.90625rem; font-weight: 600; }
.in-byline__note { font-size: 0.78125rem; color: var(--dd-text); }
.in-byline__dates { display: flex; flex-direction: column; line-height: 1.4; font-size: 0.8125rem; color: var(--dd-text); margin-left: auto; }
.in-byline__dates strong { font-weight: 600; color: var(--dd-ink); }
.in-posthead__figure { margin-block: 0; }
/* Lower than the design's 16:7 (about 490 px at full width, most of a laptop
   screen under the header): 21:8 is about 430 px. Phones get 3:2 below. */
.in-posthead__img { width: 100%; aspect-ratio: 21/8; object-fit: cover; border-radius: 10px; display: block; }
/* the cream header runs on under the photo, so the photo sits inside it */
.in-posthead__figure { padding-bottom: clamp(28px,3vw,40px); }

.in-postbody { padding-block: 48px 56px; }

.in-related { background: var(--dd-white); border: 1px solid var(--dd-hairline); border-radius: 10px; padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.in-related__label { font-size: 0.8125rem; font-weight: 600; color: var(--dd-green-accent); }
.in-related a { display: flex; justify-content: space-between; align-items: center; font-size: 0.90625rem; font-weight: 500; text-decoration: none; padding: 6px 0; border-bottom: 1px solid var(--dd-hairline-card); }
.in-related a:last-child { border-bottom: 0; }

/* Author / reviewer box: the photo runs the full height of the text (top and
   bottom on one line); name, then credentials and the credential line small. */
.in-credcard { margin-top: 12px; background: var(--dd-bg-warm); border: 1px solid var(--dd-hairline-card); border-radius: 10px; padding: 14px; display: grid; grid-template-columns: minmax(0,150px) minmax(0,1fr); gap: 22px; align-items: stretch; }
.in-credcard__img { width: 100%; height: 0; min-height: 100%; object-fit: cover; object-position: center top; border-radius: 8px; display: block; }
.in-credcard__body { display: flex; flex-direction: column; gap: 6px; padding: 4px 8px 4px 0; }
.in-credcard__label { display: inline-flex; align-items: center; gap: 6px; font-size: 0.6875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--dd-green-accent); }
.in-credcard__name { margin: 0; font-size: 1.25rem; letter-spacing: -.02em; line-height: 1.2; color: var(--dd-ink); }
.in-credcard__line { font-size: 0.78125rem; font-weight: 400; line-height: 1.45; color: var(--dd-text); }
.in-credcard__bio { margin: 2px 0 0; font-size: 0.875rem; line-height: 1.55; color: var(--dd-text); }
.in-credcard__date { font-size: 0.8125rem; color: var(--dd-text); }
.in-credcard__links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 4px; }
.in-credcard__links a { display: inline-flex; align-items: center; gap: 6px; font-size: 0.875rem; font-weight: 600; color: var(--dd-green-accent); text-decoration: none; }
.in-credcard__links a + a { color: var(--dd-ink); }
@media (max-width:900px) { .in-credcard__links a { padding-block: 10px; margin-block: -10px; } }

@media (min-width:1500px) { .in-posthead .in-post__title { font-size: 3.25rem; } }
@media (max-width:900px) {
	.in-posthead .in-post__title { font-size: 2.25rem; }
	.in-byline { flex-direction: column; align-items: flex-start; }
	.in-byline__dates { margin-left: 0; } /* under the authors, left-aligned */
	.in-credcard { grid-template-columns: minmax(0,1fr); }
	.in-credcard__img { max-width: 160px; height: auto; min-height: 0; aspect-ratio: 4/5; }
}

/* After the base rule, so it wins: 21:8 is a thin strip on a phone. */
@media (max-width:560px) { .in-posthead__img { aspect-ratio: 3/2; } }
