/* Rafter Up Roofing · blog posts (single.php and the post body blocks in content/blog/*.html)
   Loaded after main.css and pages.css, on single posts and the blog index. Class prefix: ru-post-
   Layout (14 Nov 2026, Ana's feedback): ONE column. Text always runs the full width of the article, and every photo is
   a full-width hero with its labels and caption under it. Nothing ever sits beside a photo.
   - Landscape photos show whole, at their own shape, edge to edge.
   - Tall photos (height over 80% of the width; single.php adds ru-post-figure--tall from the img width and height) show
     whole on a black slab that fits the screen, because at full width they would be two screens high.
   - The older hooks in the post markup (ru-post-split, --side, --half, --wide) no longer change the layout.
   Ana chose full-width text over a reading measure, so lines run long on desktop (about 110 characters); the larger
   desktop type size is there to soften that. Before this the text sat on a 40rem measure with tall photos beside it
   (backup: website/backups/rafterup-pure-pre-blog-fullwidth-2026-11-14).
   Documented deviations from the copywriter's overlay brief:
   - Marker numbers are near-black on brand pink (white on #C95A85 measures 3.45:1; near-black measures 4.59:1).
   - Marker labels use the theme fonts, not Montserrat, and sit in a numbered list under the photo at every width
     (real text, no script, nothing to open or hover). */

/* --post-hero-h: the tallest a tall photo's slab gets, so the whole photo fits on screen under the sticky header. */
.ru-post-article { --post-wide: 1120px; --post-hero-h: clamp(440px, calc(100vh - 150px), 820px); --post-slab-pad: clamp(16px, 2.2vw, 32px); }
.ru-post-wrap { max-width: calc(var(--post-wide) + 2 * var(--gutter)); }

/* ---------- Header: back link, title, byline, dates ---------- */
.ru-post-head { margin-bottom: 48px; }
.ru-post-back { margin-bottom: 20px; }
.ru-post-back__link { display: inline-flex; align-items: center; gap: 6px; padding-block: 6px; color: var(--body); text-decoration: none; }
.ru-post-back__link:hover { color: var(--heading); text-decoration: underline; text-underline-offset: .2em; }
.ru-post-title { margin: 0 0 24px; font-size: clamp(2.125rem, 1.45rem + 2.7vw, 3.375rem); line-height: 1.12; letter-spacing: -.02em; text-wrap: balance; }
.ru-post-byline { margin: 0 0 8px; font-size: 1.0625rem; line-height: 1.5; color: var(--heading); }
/* Hyphenated words in the title and body headings never split at the hyphen (single.php wraps them, 13 Nov 2026). */
.ru-nobr { white-space: nowrap; }
.ru-post-dates { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 0; font: 500 .8125rem/1.5 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--body-subtle); }

.ru-post-hero { margin: 0 0 72px; }
.ru-post-hero img { width: 100%; border-radius: var(--radius-md); background: var(--panel-soft); }

/* ---------- Long-form body: every block runs the full width of the article ---------- */
.ru-post-body { font-size: clamp(1.125rem, 1rem + .45vw, 1.25rem); line-height: 1.65; color: var(--body); overflow-wrap: break-word; }
.ru-post-body p, .ru-post-body ul, .ru-post-body ol { margin: 0 0 1.3em; }
.ru-post-body ul, .ru-post-body ol { padding-left: 1.3em; }
.ru-post-body ul { list-style: disc; }
.ru-post-body ol { list-style: decimal; }
.ru-post-body li { margin-bottom: .6em; padding-left: .25em; }
.ru-post-body li:last-child { margin-bottom: 0; }
.ru-post-body li::marker { color: var(--fg-brand); font-weight: 600; }
.ru-post-body strong { color: var(--heading); font-weight: 600; }
.ru-post-body h2 { margin: 88px 0 24px; font-size: clamp(1.625rem, 1.35rem + 1.1vw, 2.125rem); font-weight: 600; line-height: 1.2; letter-spacing: -.01em; color: var(--heading); text-wrap: balance; scroll-margin-top: calc(var(--header-h) + 32px); }
.ru-post-body h3 { margin: 56px 0 16px; font-size: clamp(1.25rem, 1.1rem + .7vw, 1.625rem); font-weight: 600; line-height: 1.3; color: var(--heading); text-wrap: balance; }
.ru-post-body h2 + h3 { margin-top: 32px; }
.ru-post-body > :first-child { margin-top: 0; }
.ru-post-body > :last-child { margin-bottom: 0; }
.ru-post-body a { color: var(--fg-brand); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.ru-post-body a:hover { color: var(--fg-brand-strong); text-decoration-thickness: 2px; }
.ru-post-body a:focus-visible { outline: 3px solid var(--fg-brand); outline-offset: 3px; border-radius: 2px; }

/* ---------- Photos: every one is a full-width hero, its labels and caption under it ---------- */
.ru-post-figure { margin: 64px 0 72px; }
.ru-post-shot { position: relative; }
.ru-post-shot img { display: block; width: 100%; height: auto; border-radius: var(--r-xl, 24px); background: var(--panel-medium); }
.ru-post-figure figcaption { margin-top: 18px; font-size: 1rem; line-height: 1.55; color: var(--body); }
h2 + .ru-post-figure, h3 + .ru-post-figure { margin-top: 32px; }

/* Tall photos: whole, on a black slab as tall as the screen allows. The shot box shrinks to the photo, so the numbered
   markers (placed in % of the shot) stay on their spots. Phones keep the plain full-width photo: it is already tall. */
@media (min-width: 768px) {
	.ru-post-figure--tall { display: grid; grid-template-columns: minmax(0, 1fr); }
	.ru-post-figure--tall::before { content: ""; grid-area: 1 / 1; border-radius: var(--r-xl, 24px); background: #000; }
	.ru-post-figure--tall .ru-post-shot { grid-area: 1 / 1; place-self: center; width: fit-content; max-width: calc(100% - 2 * var(--post-slab-pad)); margin-block: var(--post-slab-pad); }
	.ru-post-figure--tall .ru-post-shot img { width: auto; max-width: 100%; max-height: calc(var(--post-hero-h) - 2 * var(--post-slab-pad)); border-radius: var(--r-lg, 16px); background: none; }
}

/* Numbered markers over a photo, with the labels as a list under it */
.ru-post-marker { position: absolute; z-index: 1; display: grid; place-items: center; width: 32px; height: 32px; transform: translate(-50%, -50%); border: 2px solid #fff; border-radius: 9999px; background: var(--brand); color: var(--ink); font: 700 .9375rem/1 var(--font-mono); box-shadow: 0 2px 10px rgba(0, 0, 0, .5); pointer-events: none; }
.ru-post-body .ru-post-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px 48px; margin: 24px 0 0; padding: 0; list-style: none; counter-reset: ru-post-mark; font-size: 1.0625rem; line-height: 1.55; }
.ru-post-body .ru-post-legend li { position: relative; margin: 0; padding: 2px 0 0 42px; counter-increment: ru-post-mark; }
.ru-post-legend li::before { content: counter(ru-post-mark); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9999px; background: var(--brand); color: var(--ink); font: 700 .8125rem/1 var(--font-mono); }
.ru-post-figure--marked figcaption { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-medium); }

/* ru-post-split used to set paragraphs beside their photo. It is plain flow now: the paragraphs, then the photo. */
.ru-post-body > .ru-post-split { margin: 0; }
.ru-post-split__text > :last-child { margin-bottom: 0; }

/* ---------- Decision table: rows on hairlines, no frame ---------- */
.ru-post-body > .ru-post-tablewrap { margin: 40px 0 48px; }
.ru-post-table { width: 100%; border-collapse: collapse; font-size: clamp(1.0625rem, .944em, 1.25rem); line-height: 1.5; }
.ru-post-table th, .ru-post-table td { padding: 18px 32px 18px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border-medium); }
.ru-post-table th:last-child, .ru-post-table td:last-child { padding-right: 0; }
.ru-post-table thead th { padding-block: 0 14px; border-bottom-color: var(--border-strong); font: 500 .8125rem/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--body); }
.ru-post-table tbody th { width: 56%; font-weight: 400; color: var(--body); }
.ru-post-table tbody tr:last-child th, .ru-post-table tbody tr:last-child td { border-bottom: 0; }
.ru-post-body .ru-post-verdict--ok strong { color: var(--fg-success); }
.ru-post-body .ru-post-verdict--ask strong { color: var(--fg-warning); }
.ru-post-body .ru-post-verdict--need strong { color: var(--fg-danger); }

/* ---------- The question to ask ---------- */
.ru-post-body .ru-post-ask { margin: 40px 0 0; padding: 22px 26px; border-radius: var(--radius-md); background: rgba(240, 237, 230, .055); color: var(--heading); font-size: 1.06em; line-height: 1.55; }
.ru-post-body .ru-post-ask strong:first-child { display: block; margin-bottom: 6px; font: 500 .8125rem/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--fg-brand); }

/* ---------- Checklists ---------- */
.ru-post-body .ru-post-checklist { padding-left: 0; list-style: none; }
.ru-post-body .ru-post-checklist li { position: relative; margin-bottom: .85em; padding-left: 38px; }
.ru-post-checklist li::before { content: ""; position: absolute; left: 0; top: .32em; width: 22px; height: 22px; background: var(--fg-brand);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat; }

/* ---------- Spencer's sign-off inside the copy ---------- */
.ru-post-body > .ru-post-cta { margin: 72px 0; padding: 40px 44px; border-radius: var(--radius-md); background: radial-gradient(120% 90% at 0% 0%, var(--brand-softer) 0%, transparent 65%), rgba(240, 237, 230, .04); }
.ru-post-body .ru-post-cta h3 { margin-top: 0; font-size: clamp(1.375rem, 1.2rem + .7vw, 1.75rem); line-height: 1.2; }
.ru-post-cta > :last-child { margin-bottom: 0; color: var(--heading); }

/* ---------- FAQ: every answer visible on load ---------- */
.ru-post-body > .ru-post-faq { margin-top: 40px; }
.ru-post-body .ru-post-faq h3 { margin: 0 0 12px; padding-top: 32px; border-top: 1px solid var(--border-medium); }
.ru-post-body .ru-post-faq h3:first-child { padding-top: 0; border-top: 0; }
.ru-post-body .ru-post-faq p { margin-bottom: 32px; }
.ru-post-body .ru-post-faq p:last-child { margin-bottom: 0; }

/* ---------- Sources and the disclaimer ---------- */
.ru-post-body > .ru-post-sources { margin-top: 104px; padding-top: 48px; border-top: 1px solid var(--border-medium); font-size: 1rem; line-height: 1.6; }
.ru-post-body .ru-post-sources h2 { margin: 0 0 12px; font-size: 1.5rem; }
.ru-post-body .ru-post-sources h3 { margin: 36px 0 14px; font: 500 .8125rem/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--body); }
.ru-post-body .ru-post-sources li { margin-bottom: .7em; }
.ru-post-body .ru-post-sources a { overflow-wrap: anywhere; }
.ru-post-body .ru-post-disclaimer { margin-top: 36px; font-size: .9375rem; color: var(--body); }

/* ---------- Closing call to action (single.php) ---------- */
.ru-post-foot { margin-top: 104px; padding: 56px 48px; border-radius: var(--radius-md); background: radial-gradient(110% 120% at 0% 0%, var(--brand-soft) 0%, transparent 62%), rgba(240, 237, 230, .04); }
.ru-post-foot__h { margin: 0 0 28px; font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.375rem); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; color: var(--heading); }
.ru-post-foot .ru-or { font-size: 1.0625rem; color: var(--heading); }

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
	.ru-post-article { padding-block: 72px 96px; }
	.ru-post-head { margin-bottom: 36px; }
	.ru-post-hero { margin-bottom: 48px; }
	.ru-post-body h2 { margin-top: 72px; }
	.ru-post-body h3 { margin-top: 48px; }
	.ru-post-figure { margin: 40px 0 48px; }
	.ru-post-body > .ru-post-cta { margin: 56px 0; padding: 32px 24px; }
	.ru-post-foot { margin-top: 80px; padding: 40px 24px; }
	.ru-post-foot .ru-btn { width: 100%; white-space: normal; text-align: center; }
	.ru-post-body > .ru-post-sources { margin-top: 80px; }
}
@media (max-width: 639px) {
	.ru-post-body { font-size: 1.0625rem; line-height: 1.68; }
	.ru-post-marker { width: 26px; height: 26px; border-width: 2px; font-size: .8125rem; }
	.ru-post-body .ru-post-ask { padding: 20px; }
	/* Table: each row becomes its own short block, the verdict under the roof it belongs to */
	.ru-post-table, .ru-post-table tbody, .ru-post-table tr, .ru-post-table th, .ru-post-table td { display: block; }
	.ru-post-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
	.ru-post-table tbody tr { padding: 18px 0; border-bottom: 1px solid var(--border-medium); }
	.ru-post-table tbody tr:first-child { padding-top: 0; }
	.ru-post-table tbody tr:last-child { padding-bottom: 0; border-bottom: 0; }
	.ru-post-table tbody th, .ru-post-table tbody td { width: auto; padding: 0; border: 0; }
	.ru-post-table tbody td { margin-top: 8px; }
	.ru-post-table td::before { content: attr(data-label); display: block; margin-bottom: 2px; font: 500 .75rem/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--body-subtle); }
}

@media print {
	.ru-post-foot, .ru-post-back { display: none; }
	.ru-post-body { font-size: 11pt; color: #000; }
}
