/* ==========================================================================
   Resources section (blog.php + blog/*.php) — "The Bid Package" reading room.
   Tokens and shared components come from site.css; this file only lays out
   the index, the article title block, the reading column and the sidebar.
   ========================================================================== */

/* Local guards for two shared-token issues (reported to the coordinator):
   --mark-hover resolves to nothing, and outline buttons on dark panels hover to
   var(--ink), which is light in the dark theme. */
.rs .button--solid:hover { background: var(--mark); filter: brightness(.94); }
.rs .panel .button--outline:hover,
.rs .close-panel .button--outline:hover { background: var(--on-asphalt); color: var(--asphalt); border-color: var(--on-asphalt); }

/* --------------------------------------------------------------------------
   Breadcrumb + title block
   -------------------------------------------------------------------------- */
.rs-head { padding: clamp(24px, 3.4vw, 48px) 0 clamp(24px, 3vw, 36px); }
.rs-head--index { border-bottom: var(--rule); padding-bottom: clamp(32px, 4vw, 52px); }

.rs-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; list-style: none; margin: 0 0 clamp(18px, 2.4vw, 28px); padding: 0; font-size: .9rem; color: var(--ink-2); }
.rs-crumbs li { display: flex; align-items: center; }
.rs-crumbs li + li::before { content: "/"; margin: 0 .65em; color: var(--ink-3); }
.rs-crumbs a { display: inline-block; padding-block: 8px; color: var(--ink-2); }
.rs-crumbs a:hover { color: var(--ink); }
.rs-crumbs [aria-current] { color: var(--ink); font-weight: 600; }

.rs-head h1 { font-size: clamp(2.3rem, 1.5rem + 3vw, 4rem); max-width: 20ch; margin-bottom: .4em; }
.rs-head--index h1 { font-size: var(--step-4); max-width: 14ch; }
.rs-standfirst { font-size: var(--step-1); line-height: 1.5; color: var(--ink-2); max-width: 60ch; margin: 0 0 clamp(20px, 2.6vw, 30px); }
.rs-head--index .rs-standfirst { margin-bottom: 0; }

/* Meta strip: cells divided by rules, never middle dots */
.rs-meta { display: flex; flex-wrap: wrap; margin: 0; border-top: var(--rule); border-bottom: 1px solid var(--hair); }
.rs-meta > div { padding: 10px 28px 10px 0; margin-right: 28px; border-right: 1px solid var(--hair); }
.rs-meta > div:last-child { border-right: 0; margin-right: 0; }
.rs-meta dt { font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.rs-meta dd { margin: 2px 0 0; font-weight: 600; color: var(--ink); }

/* Lead photo */
.rs-lead { aspect-ratio: 21 / 9; max-height: 580px; width: 100%; }
.rs-lead img { height: 100%; }

/* --------------------------------------------------------------------------
   Article: reading column + sidebar
   -------------------------------------------------------------------------- */
.rs-body {
    display: grid; grid-template-columns: minmax(0, 35rem) minmax(280px, 380px);
    justify-content: space-between; align-items: start; column-gap: clamp(32px, 5vw, 80px); row-gap: 48px;
    padding-block: clamp(32px, 4vw, 56px) var(--section);
}

.rs-prose { font-size: 1.1875rem; line-height: 1.7; max-width: 35rem; min-width: 0; } /* ~68-72 characters per line */
.rs-prose > :first-child { margin-top: 0; }
.rs-prose p, .rs-prose ul, .rs-prose ol { margin: 0 0 1.05em; }
.rs-prose li { margin-bottom: .4em; padding-left: .15em; }
.rs-prose li::marker { color: var(--ink-3); }
.rs-prose a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .18em; }
.rs-prose a:hover { text-decoration-thickness: 2px; }
.rs-prose h2 { font-size: clamp(1.65rem, 1.25rem + 1.2vw, 2.25rem); line-height: 1; margin: 2.1em 0 .6em; max-width: 24ch; }
.rs-prose h3 { font-size: 1.25rem; margin: 1.7em 0 .45em; }
.rs-prose h2 + h3 { margin-top: .9em; }
.rs-prose strong { color: var(--ink); }

/* Tables */
.rs-table { margin: 1.3em 0 1.6em; overflow-x: auto; background: var(--sheet); border-top: var(--rule); border-bottom: var(--rule); }
.rs-table table { font-size: 1rem; line-height: 1.45; }
.rs-table th, .rs-table td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--hair); }
.rs-table thead th { padding-block: 10px; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); background: var(--paper); border-bottom: var(--rule); }
.rs-table tbody th { font-weight: 600; }
.rs-table tbody tr:last-child th, .rs-table tbody tr:last-child td { border-bottom: 0; }
.rs-table td { font-variant-numeric: tabular-nums; }

/* Note sheet (figures disclaimer, ADA "not legal advice") */
.rs-note { margin: 1.3em 0 1.6em; padding: 16px 20px; background: var(--sheet); border: var(--rule); font-size: 1rem; line-height: 1.6; }
.rs-note p { margin: 0; }

/* Side-by-side sheets inside the reading column */
.rs-split { margin: 1.3em 0 1.6em; grid-template-columns: 1fr; }
.rs-split > * + * { border-left: 0; border-top: var(--rule); }
.rs-split > * { padding: 20px 22px; }
.rs-split h3 { margin-top: 0; }
.rs-split .terms-table { font-size: 1rem; line-height: 1.45; }
.rs-split .terms-table th { width: 55%; font-weight: 600; }
.rs-split .terms-table td { text-align: right; }
.rs-split .rs-total th, .rs-split .rs-total td { font-weight: 700; border-top: var(--rule); }
.rs-split .check-list { font-size: 1rem; }
.rs-split .check-list li { margin: 0; padding-block: 9px; }
.rs-split .check-list li::before { top: 14px; }
.rs-prose .check-list li { margin: 0; padding-left: 34px; }
.rs-checklist { margin-bottom: 1.2em; }

/* Printable checklist: empty boxes to tick on paper */
.rs-boxes { list-style: none; padding: 0; margin: 1em 0 1.6em; border-top: var(--rule); border-bottom: var(--rule); background: var(--sheet); }
.rs-boxes li { position: relative; margin: 0; padding: 11px 16px 11px 50px; border-top: 1px solid var(--hair); }
.rs-boxes li:first-child { border-top: 0; }
.rs-boxes li::before { content: ""; position: absolute; left: 16px; top: 15px; width: 18px; height: 18px; border: var(--line) solid var(--ink); border-radius: 2px; background: var(--field); }

/* A real sequence keeps its numbers */
.rs-steps { padding-left: 1.6em; }
.rs-steps li::marker { font-family: var(--font-display); font-weight: 800; color: var(--ink); }

/* Sidebar */
.rs-side { display: grid; gap: 32px; min-width: 0; }
.rs-side h2 { font-size: 1.35rem; line-height: 1; margin-bottom: .6em; }
.rs-side__cta { padding: 24px; border-top: var(--line) solid var(--mark); }
.rs-side__cta h2 { font-size: 1.75rem; }
.rs-side__cta p { font-size: 1rem; line-height: 1.55; }
.rs-side__actions { display: grid; gap: 10px; margin-top: 18px; }
.rs-side__actions .button { width: 100%; }
.rs-side__list ul { list-style: none; margin: 0; padding: 0; border-top: var(--rule); }
.rs-side__list li { border-bottom: 1px solid var(--hair); }
.rs-side__list a { display: flex; align-items: center; min-height: 44px; padding: 10px 0; font-weight: 600; line-height: 1.35; color: var(--ink); text-decoration: none; }
.rs-side__list a:hover { text-decoration: underline; }
@media (min-width: 961px) and (min-height: 860px) { .rs-side { position: sticky; top: 104px; } }

@media (max-width: 960px) {
    .rs-body { grid-template-columns: minmax(0, 1fr); }
    .rs-prose { max-width: 35rem; }
    .rs-side { max-width: 46rem; }
}
@media (max-width: 860px) {
    .rs-lead { aspect-ratio: 4 / 3; }
}
@media (max-width: 560px) {
    .rs-prose { font-size: 1.0625rem; }
    .rs-table table { font-size: .94rem; }
    .rs-table th, .rs-table td { padding: 9px 10px; }
    .rs-meta > div { padding-right: 16px; margin-right: 16px; }
    .rs-split > * { padding: 18px 16px; }
    .rs-side__cta { padding: 22px 18px; }
    .plate figcaption { font-size: .68rem; padding: 8px 10px; }
}

/* --------------------------------------------------------------------------
   Index (blog.php)
   -------------------------------------------------------------------------- */
.rs-featured { padding-top: clamp(32px, 4vw, 56px); }
.rs-featured__grid { grid-template-columns: 1fr 1.25fr; }
.rs-featured__grid > .plate { min-height: 380px; }
.rs-featured__text { display: flex; flex-direction: column; justify-content: center; }
.rs-featured__text .rs-meta { margin-bottom: 22px; }
.rs-featured__text h2 { font-size: clamp(1.9rem, 1.2rem + 2vw, 3rem); margin-bottom: .45em; }
.rs-featured__text h2 a, .rs-entry h3 a { text-decoration: none; color: var(--ink); }
.rs-featured__text h2 a:hover { box-shadow: inset 0 -.18em 0 var(--mark); }
.rs-featured__text p { color: var(--ink-2); font-size: 1.1rem; max-width: 52ch; }
.rs-more { display: inline-flex; align-items: center; gap: .5em; align-self: flex-start; min-height: 44px; font-weight: 700; color: var(--ink); text-decoration: none; }
.rs-more { box-shadow: inset 0 -3px 0 var(--mark); }
.rs-more:hover { box-shadow: inset 0 -6px 0 var(--mark); }
.rs-more .icon { transition: transform 200ms var(--ease); }
@media (hover: hover) { .rs-more:hover .icon { transform: translateX(3px); } }

.rs-section-title { font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.6rem); margin-bottom: 20px; }
.rs-list { list-style: none; margin: 0; padding: 0; border-top: var(--rule); }
.rs-entry { display: grid; grid-template-columns: 260px minmax(0, 1fr) 190px; gap: clamp(20px, 3vw, 40px); align-items: start; padding: 24px 0; border-bottom: 1px solid var(--hair); }
.rs-entry__photo { display: block; aspect-ratio: 4 / 3; overflow: hidden; border: var(--rule); background: var(--asphalt); }
.rs-entry__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ease); }
@media (hover: hover) { .rs-entry:hover .rs-entry__photo img { transform: scale(1.03); } }
.rs-entry h3 { font-size: clamp(1.25rem, 1rem + .7vw, 1.55rem); line-height: 1.2; margin: 2px 0 .45em; }
.rs-entry h3 a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.rs-entry p { margin: 0; color: var(--ink-2); max-width: 62ch; }
.rs-meta--stack { display: grid; gap: 0; border-top: var(--rule); }
.rs-meta--stack > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; margin: 0; border-right: 0; border-bottom: 1px solid var(--hair); }
.rs-meta--stack > div:last-child { border-bottom: 0; }
.rs-meta--stack dd { margin: 0; text-align: right; font-size: .95rem; }
.rs-meta--stack dt { align-self: center; }
.rs-entry .rs-meta--stack { border-bottom: 0; }

.rs-topics.section { padding-top: var(--section); }
.rs-topic-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); column-gap: clamp(24px, 3vw, 44px); border-top: var(--rule); }
.rs-topic-list li { padding: 14px 0 16px; border-bottom: 1px solid var(--hair); }
.rs-topic-list a { display: inline-block; padding-block: 6px; font: 850 1.4rem/1 var(--font-display); font-stretch: 78%; text-transform: uppercase; color: var(--ink); text-decoration: none; }
.rs-topic-list a:hover { box-shadow: inset 0 -.2em 0 var(--mark); }
.rs-topic-list a .icon { width: .85em; height: .85em; margin-left: .3em; vertical-align: -.08em; }
.rs-topic-list span { display: block; color: var(--ink-2); font-size: .98rem; }

@media (max-width: 1060px) {
    .rs-entry { grid-template-columns: 220px minmax(0, 1fr); }
    .rs-entry .rs-meta--stack { grid-column: 2; display: flex; flex-wrap: wrap; border-top: 0; }
    .rs-entry .rs-meta--stack > div { display: block; padding: 0 20px 0 0; margin-right: 20px; border-bottom: 0; border-right: 1px solid var(--hair); }
    .rs-entry .rs-meta--stack > div:last-child { border-right: 0; }
    .rs-entry .rs-meta--stack dd { text-align: left; }
    .rs-entry__text { grid-row: 1; grid-column: 2; }
    .rs-entry__photo { grid-row: 1 / span 2; }
}
@media (max-width: 860px) {
    .rs-featured__grid { grid-template-columns: 1fr; }
    .rs-featured__grid > .plate { order: -1; min-height: 0; aspect-ratio: 16 / 9; border-top: 0; }
    .rs-featured__grid > .rs-featured__text { border-top: var(--rule); }
}
@media (max-width: 600px) {
    .rs-entry { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .rs-entry__photo { grid-row: auto; aspect-ratio: 16 / 9; }
    .rs-entry__text, .rs-entry .rs-meta--stack { grid-column: 1; grid-row: auto; }
    .rs-entry .rs-meta--stack > div { padding-right: 14px; margin-right: 14px; }
}

@media print {
    .rs-side, .rs-crumbs, .rs-lead { display: none !important; }
    .rs-body { display: block; padding: 0; }
    .rs-prose { max-width: none; font-size: 11pt; }
}
