/* Article pages (posts/*): reading layout on top of site-expert.css.
   Everything on one centre line: title, date and tags, then the article column; pictures sit smaller than the text, tables reach wider. */
:root { --prose: min(1080px, var(--shell)); --wide: min(1080px, var(--shell)); --tint: #ead8c0; --tint-soft: #f2e7d7; }

/* Header block in the brand colours: ink with gold, like the logo */
.post-hero { padding: 88px 0 64px; background: var(--ink); color: var(--white); }
.post-hero .shell { text-align: center; }
.post-hero .eyebrow { color: var(--mark-gold); }
.post-hero h1 { max-width: 1080px; margin: 0 auto; font-family: var(--serif); font-size: clamp(40px, 4.9vw, 70px); text-wrap: pretty; font-weight: 400; letter-spacing: -.035em; line-height: 1; }

.post-deck { max-width: 760px; margin: 22px auto 0; color: rgba(255,253,248,.82); font-family: var(--serif); font-size: clamp(20px, 2vw, 26px); font-style: italic; line-height: 1.3; text-wrap: balance; }
.post-meta { margin: 24px 0 0; color: rgba(255,253,248,.7); font-size: 15px; }
.post-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 20px; }
.post-tag { padding: 6px 12px; border: 1px solid rgba(200,147,92,.55); color: var(--mark-gold); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-decoration: none; }

/* Article column */
.post-layout { padding: 72px 0 96px; }
.prose { max-width: var(--prose); margin-inline: auto; color: var(--ink); font-size: 19px; line-height: 1.75; counter-reset: section; }
.prose > * { margin: 0 0 28px; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose > p:first-child { font-size: 22px; line-height: 1.6; }
/* An opening statement: the article starts with one big line */
.prose > p.opening { margin-bottom: 36px; font-family: var(--serif); font-size: clamp(34px, 3.6vw, 50px); letter-spacing: -.03em; line-height: 1.1; }
.prose h2 { counter-increment: section; margin: 80px 0 24px; padding-top: 28px; border-top: 1px solid var(--ink); font-family: var(--serif); font-size: clamp(28px, 2.9vw, 38px); font-weight: 400; letter-spacing: -.02em; line-height: 1.1; scroll-margin-top: 24px; }
.prose h2::before { content: counter(section, decimal-leading-zero); display: block; margin-bottom: 14px; color: var(--accent); font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .14em; }
.prose h3 { margin: 48px 0 16px; font-family: var(--serif); font-size: 28px; font-weight: 400; line-height: 1.2; }
.prose a { color: var(--accent-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { color: var(--ink); }
.prose em { font-style: italic; }
.prose code { padding: 1px 4px; background: var(--tint-soft); color: var(--ink); font-family: inherit; font-size: .94em; }

/* Lists: a short accent line instead of bullets */
.prose ul { padding: 0; list-style: none; }
.prose li { position: relative; margin: 0 0 10px; padding-left: 26px; }
.prose li::before { content: ""; position: absolute; left: 0; top: .9em; width: 12px; height: 1px; background: var(--accent); }
.prose ol { padding: 0; list-style: none; counter-reset: step; }
.prose ol li { counter-increment: step; padding-left: 38px; }
.prose ol li::before { content: counter(step) "."; top: 0; width: auto; height: auto; background: none; color: var(--accent-dark); font-size: inherit; font-weight: 600; letter-spacing: .06em; }
.prose blockquote p.quote-translation { margin-top: 14px; color: var(--ink-soft); font-family: var(--sans); font-size: 16px; font-style: normal; }
.prose blockquote p.quote-translation::before { content: none; }
.prose a { color: var(--accent-dark); overflow-wrap: anywhere; }

.prose figure { max-width: 620px; margin: 48px auto; }
.prose figure img { width: 100%; height: auto; }
.prose figure.chart { max-width: 960px; }
.prose figure.chart figcaption { font-size: 15px; }
/* Upright photos (phone screens): the photo stays narrow, its caption below it is not */
.prose figure.portrait { max-width: 640px; text-align: center; }
.prose figure.portrait img { display: block; width: 300px; max-width: 100%; margin-inline: auto; }
.prose figure.portrait.narrow img { width: 260px; }
.prose figure.portrait figcaption { margin-top: 16px; }
.prose figcaption { margin-top: 12px; text-align: center; color: var(--ink-soft); font-size: 14px; line-height: 1.55; }

/* Pull quote: the line to remember, centred under a gold quote mark */
/* as wide as the tables, so a short quote stays on one line */
.prose > blockquote { width: var(--wide); max-width: none; margin: 40px 0 40px 50%; transform: translateX(-50%); text-align: center; }
.prose blockquote p { text-wrap: wrap; }
.prose blockquote p::before { content: "\201C"; margin-right: .12em; color: var(--mark-gold); font-size: 1.7em; line-height: 0; vertical-align: -.32em; }
.prose blockquote p { margin: 0; color: var(--ink); font-family: var(--serif); font-size: clamp(22px, 2vw, 28px); font-style: italic; line-height: 1.3; }

/* Small reference box (label: value) */
.parameter-box { padding: 8px 28px 10px; background: var(--tint-soft); border-top: 2px solid var(--accent); }
.parameter-box-header { padding: 18px 0 12px; }
.parameter-box-title { color: var(--accent-dark); font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.param-row { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 14px 0; border-top: 1px solid var(--tint); }
.param-label { font-size: 16px; font-weight: 600; }
.param-value { font-family: var(--serif); font-size: 24px; line-height: 1.2; }
.param-unit { margin-left: 6px; color: var(--ink-soft); font-family: var(--sans); font-size: 14px; }

/* Data tables: dark header row, light bands for reading across */
.table-wrap { overflow-x: auto; margin: 56px 0; }
/* tables use the wider measure, centred on the text column */
.prose > .table-wrap { width: var(--wide); max-width: none; margin-left: 50%; transform: translateX(-50%); }
.data-table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.5; }
.data-table th { padding: 14px 18px; background: var(--ink); color: var(--white); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table tbody tr:nth-child(even) td { background: var(--tint-soft); }
.data-table td:first-child { font-weight: 600; }
.data-table td:not(:first-child):not(:last-child) { white-space: nowrap; }

/* After the article: the author, then related posts; same width as the article */
.post-end { padding: 0 0 110px; }
.post-end-main { max-width: var(--prose); margin-inline: auto; }
.related .article-card { background: var(--tint-soft); }
.related .article-copy { min-height: 0; }
.related > h2 { margin: 0 0 22px; }
.author-box + .related { margin-top: 64px; }
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.related-post { display: flex; flex-direction: column; min-height: 180px; padding: 26px 28px; background: var(--tint-soft); color: inherit; text-decoration: none; }
.related-post h3 { margin: 0; font-family: var(--serif); font-size: 26px; font-weight: 400; line-height: 1.2; }
.related-post span:last-child { margin-top: auto; padding-top: 20px; font-size: 12px; font-weight: 600; }
.related-post:hover h3 { color: var(--accent-dark); }

.author-box { display: grid; grid-template-columns: 140px 1fr; gap: 28px; align-items: center; margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--line); }
.author-box img { width: 140px; height: 140px; object-fit: cover; }
.author-box h2 { margin: 0 0 6px; font-family: var(--serif); font-size: 26px; font-weight: 400; }
.author-box h2 a { color: inherit; text-underline-offset: 4px; }
.author-box p { margin: 0; color: var(--ink-soft); font-size: 16px; }

@media (max-width: 820px) {
    .post-hero { padding: 64px 0 44px; }
    .post-layout { padding: 44px 0 72px; }
    .prose { font-size: 18px; }
    .prose > p:first-child { font-size: 20px; }
    .prose > p.opening { font-size: 34px; }
    .related-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .author-box { grid-template-columns: 96px 1fr; gap: 18px; }
    .author-box img { width: 96px; height: 96px; }
    .param-row { flex-direction: column; gap: 4px; }
    .parameter-box { padding-inline: 20px; }
}
