/* ── the page ──────────────────────────────────────────────────────────── */
/* A short intro beside the asset's own panel, then the body copy in a measure you can read.
   The panel is sticky, so the form is one glance away from anywhere on the page rather than a
   screen below the text. */
.res-hero { padding-bottom: 120px; }
.res-hero .crumbs { justify-content: flex-start; margin-bottom: 32px; }
.res-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 64px; align-items: start; text-align: left; }
.res-main { display: grid; gap: 40px; max-width: 62ch; }
.res-intro { padding-top: 4px; }
.res-intro h1 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.12; margin: 14px 0 20px; max-width: 18ch; }
.res-intro .lead { margin: 0; max-width: 46ch; }

.res-aside { position: sticky; top: 96px; display: grid; gap: 20px; }
.res-cover { margin: 0; }
.res-cover .frame { margin: 0; }
.res-cover img { display: block; width: 100%; height: auto; }

/* Body copy: a measure you can read, and real spacing between paragraphs. These went missing once
   when the surrounding section was removed, and the page became one undifferentiated block. */
.res-prose p { color: var(--fg-2); font-size: 16px; line-height: 1.75; margin: 0 0 20px; }
.res-prose p:last-child { margin-bottom: 0; }
.res-prose ul { margin: 4px 0 20px; padding-left: 22px; }
.res-prose li { color: var(--fg-2); font-size: 16px; line-height: 1.7; margin: 0 0 10px; }
.res-prose li::marker { color: var(--accent); }

/* The "what you will learn" points: a definition list reads better than a grid of cards when the
   bodies are one line each, and it does not leave a ragged last row. */
.res-points dl { margin: 0; display: grid; gap: 18px; }
.res-points dt { font-size: 15.5px; font-weight: 600; color: rgb(var(--ink) / .92); margin-bottom: 5px; }
.res-points dd { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--fg-2); }
.res-points dl > div { padding-left: 16px; border-left: 2px solid rgb(var(--accent-rgb, 19 233 137) / .35); }

@media (max-width: 980px) {
  .res-top { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .res-main { max-width: none; }
  .res-aside { position: static; max-width: 460px; }
}

/* The resource gate, and the pages it sits on. */

.res-gate { max-width: 760px; margin-inline: auto; padding: 40px; border: 1px solid var(--line); border-radius: 20px; background: rgb(var(--ink) / .03); }
.res-gate-head { text-align: center; margin-bottom: 32px; }
.res-gate-head h2 { font-size: 26px; margin: 10px 0 12px; }
.res-gate-head p { color: var(--fg-2); margin: 0; }

.res-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.res-field { display: block; margin-bottom: 16px; }
.res-field > span { display: block; font-size: 13.5px; color: var(--fg-2); margin-bottom: 7px; }
.res-field input,
.res-field select {
  width: 100%; padding: 12px 14px; border-radius: 10px; font: inherit; font-size: 15px;
  color: inherit; background: rgb(var(--ink) / .04); border: 1px solid var(--line);
  appearance: none; -webkit-appearance: none;
}
.res-field select {
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 19px) 52%, calc(100% - 13px) 52%;
  background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; padding-right: 38px;
}
.res-field input:focus-visible,
.res-field select:focus-visible { outline: none; border-color: var(--accent); background: rgb(var(--ink) / .06); }

.res-check { display: flex; gap: 12px; align-items: flex-start; margin: 10px 0 24px; font-size: 14px; color: var(--fg-2); line-height: 1.55; }
.res-check input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.res-check a { color: var(--accent); }

.res-gate form > .btn { width: 100%; justify-content: center; }
.res-gate .fine { text-align: center; margin: 14px 0 0; }
.res-error { margin: 0 0 16px; padding: 12px 14px; border-radius: 10px; font-size: 14.5px; color: #ffb4b4; background: rgb(255 80 80 / .08); border: 1px solid rgb(255 80 80 / .22); }

.res-gate-done { text-align: center; }
.res-gate-done h2 { font-size: 26px; margin: 10px 0 12px; }
.res-gate-done p { color: var(--fg-2); margin: 0 0 26px; }
.res-gate-done .hero-actions { justify-content: center; }

@media (max-width: 860px) {
  .res-top { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .res-cover { max-width: 420px; }
}
@media (max-width: 560px) {
  .res-gate-section { padding-top: 64px; }
  .res-gate { padding: 26px 20px; border-radius: 16px; }
  .res-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
}

/* A resource whose source page has no description at all (15 of the 26): the gate sits in the hero
   beside the cover, so the page is one screen that asks for the download, rather than a title and a
   form with an empty band between them. */
.res-top.is-bare { align-items: start; gap: 48px; }
.res-top.is-bare .res-gate { margin: 32px 0 0; max-width: none; padding: 32px; }
.res-top.is-bare .res-gate-head { text-align: left; margin-bottom: 24px; }
.res-top.is-bare .res-gate-head h2 { font-size: 22px; }
.res-top.is-bare .res-gate .fine { text-align: left; }
.res-top.is-bare .res-gate-done { text-align: left; }
.res-top.is-bare .res-gate-done .hero-actions { justify-content: flex-start; }
@media (max-width: 860px) { .res-top.is-bare .res-gate { padding: 26px 20px; } }

/* What you are about to download, measured from the file itself at port time. */
.res-meta { display: inline-block; margin: 0 0 4px; padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; font-family: var(--mono); font-size: 12px; letter-spacing: .04em; color: var(--fg-2); }

/* Three more from the library, so a resource page is a way into the rest rather than a dead end. */
.res-more { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.res-more-card { display: flex; flex-direction: column; gap: 14px; padding: 20px; text-decoration: none; }
.res-more-shot { display: block; border-radius: 12px; overflow: hidden; background: rgb(var(--ink) / .05); aspect-ratio: 16 / 9; }
.res-more-shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.res-more-label { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.res-more-title { font-size: 16.5px; font-weight: 500; line-height: 1.4; color: rgb(var(--ink) / .92); }
.res-more-card:hover .res-more-title, .res-more-card:focus-visible .res-more-title { color: var(--mint); }
@media (max-width: 860px) { .res-more { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 560px) { .res-more { grid-template-columns: minmax(0, 1fr); } }
:root[data-theme="light"] .res-error { color: var(--red); }

/* Light skin: small green text uses --mint (≥4.5:1 on the light surfaces); --accent stays for dots, fills,
   borders and large numbers. Light only, so the dark skin is unchanged. */
:root[data-theme="light"] .res-prose li::marker,
:root[data-theme="light"] .res-check a,
:root[data-theme="light"] .res-more-label { color: var(--mint); }
