/* =============================================================================
   BillGrid public site: showcase pieces shared by the home page and the feature pages
   (pages/index.html, pages/features/*.html): a chapter of copy beside a real screen, a framed
   screen, a row of short facts. Loads after outer/site.css, before the page's own stylesheet.
   ============================================================================= */

/* ---------- a chapter: copy beside a real screen (the home page's three jobs, a feature page's scenes) ---------- */
.chapter { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 88px); align-items: center; margin-top: clamp(56px, 7vw, 110px); }
.chapter--flip { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
.chapter--flip .chapter__copy { order: 2; }
.chapter :is(h2, h3) { margin-top: 10px; font-size: clamp(28px, 2.8vw, 40px); line-height: 1.05; letter-spacing: -.03em; }
.chapter__copy > p:not(.kicker) { margin-top: 14px; color: var(--text-muted); }
/* a readable crop of a full screenshot; --w/--x/--y are set per figure in the template */
/* a quiet line under a chapter's checklist: links to the free tools that answer its next question */
.chapter__copy > p.chapter__more { margin-top: 16px; font-size: var(--fs-sm); color: var(--caption); }
.chapter__more a { color: var(--ink); text-decoration-color: var(--gold); text-underline-offset: 3px; }
.chapter__screen { position: relative; overflow: hidden; aspect-ratio: 16 / 10; margin: 0; border-radius: 14px; background: #fff; box-shadow: 0 40px 80px -50px rgba(40, 32, 16, .5), 0 0 0 1px var(--line); }
.chapter__screen img { position: absolute; left: var(--x, 0); top: var(--y, 0); width: var(--w, 100%); max-width: none; }
/* chapter 01: the client's phone view leans on the invoices list */
.chapter__art { position: relative; }
.chapter__phone { position: absolute; right: -18px; bottom: -34px; width: 27%; padding: 6px; border-radius: 26px; background: var(--sand-900); box-shadow: 0 40px 80px -30px rgba(40, 32, 16, .6); }
.chapter__phone img { border-radius: 20px; }
@media (max-width: 900px) { .chapter, .chapter--flip { grid-template-columns: minmax(0, 1fr); } .chapter--flip .chapter__copy { order: 0; } }
@media (max-width: 560px) { .chapter__phone { right: 8px; bottom: -24px; width: 34%; } }

/* a chapter whose screen is tall and narrow (a settings card): the copy gets the wider column */
.chapter--tall { grid-template-columns: minmax(0, 1fr) minmax(0, .72fr); }
.chapter--tall > .shot { justify-self: end; width: 100%; }
/* a main screen with the phone leaning beside it, not over what the screen is about */
.chapter__art--beside > .shot { width: 80%; }
.chapter__art--beside .chapter__phone { right: 0; bottom: -28px; width: 24%; }
/* a thin strip of the app above a pair of screens */
.chapter__art--stack { display: grid; gap: 16px; }
.shot-pair { display: grid; grid-template-columns: minmax(0, .78fr) minmax(0, 1fr); gap: 16px; align-items: end; }
@media (max-width: 900px) { .chapter--tall { grid-template-columns: minmax(0, 1fr); } .chapter--tall > .shot { justify-self: stretch; } }
@media (max-width: 560px) { .shot-pair { grid-template-columns: minmax(0, 1fr); } .chapter__art--beside > .shot { width: 100%; } .chapter__art--beside .chapter__phone { position: static; width: 56%; margin: 16px auto 0; } }

/* ---------- a whole screenshot in a frame; the figure takes its height from the image ---------- */
.shot { position: relative; margin: 0; overflow: hidden; border-radius: 14px; background: #fff; box-shadow: 0 40px 80px -50px rgba(40, 32, 16, .5), 0 0 0 1px var(--line); }
.shot img { width: 100%; }
.shot--hero { margin-top: clamp(36px, 5vw, 56px); border-radius: 16px; box-shadow: 0 60px 120px -60px rgba(40, 32, 16, .55), 0 0 0 1px var(--line); }
/* on a phone a wide screen is shown larger, from the part that matters (--m-w width, --m-x offset, set on the figure) */
@media (max-width: 640px) { .shot--hero img { width: var(--m-w, 100%); max-width: none; margin-left: var(--m-x, 0); } }
/* a detail laid over a chapter's main screen (the phone leans the same way): stacked under it on a narrow screen */
.chapter__art--inset { margin-bottom: clamp(40px, 6vw, 72px); }
.shot--inset { position: absolute; z-index: 1; width: var(--inset-w, 46%); box-shadow: 0 40px 80px -30px rgba(40, 32, 16, .6), 0 0 0 1px var(--line); }
.shot--inset.is-left-in { left: 3%; bottom: -16%; }
@media (max-width: 720px) {
  .chapter__art--inset { display: grid; gap: 16px; margin-bottom: 0; }
  .shot--inset { position: static; width: 100%; }
}

.shot--narrow { max-width: 880px; margin-inline: auto; }
.chapter__phone--solo { position: static; width: min(300px, 72%); margin-inline: auto; }

/* ---------- a row of short facts under a screen ---------- */
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px clamp(20px, 3vw, 40px); margin: clamp(32px, 4vw, 48px) 0 0; padding: 0; list-style: none; }
.facts li { display: flex; gap: 12px; align-items: flex-start; }
.facts__icon { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--gold-soft); color: var(--gold-deep); }
.facts b { display: block; font-weight: 600; color: var(--ink); }
.facts li > div > span { display: block; margin-top: 2px; font-size: var(--fs-sm); color: var(--text-muted); }
@media (max-width: 900px) { .facts { grid-template-columns: minmax(0, 1fr); } }

/* ---------- small pills that name the choices (term sets, trades) ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.tags li { padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--r-pill); background: #fff; font-size: var(--fs-sm); color: var(--ink); }

/* ---------- the principles, ruled like a magazine's: a rule, a bold line, a quiet sentence ---------- */
.rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px); margin: clamp(32px, 4vw, 48px) 0 0; padding: 0; list-style: none; }
.rules li { padding-top: 16px; border-top: 1px solid var(--ink); }
.rules b { display: block; font-size: var(--fs-md); font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
.rules span { display: block; margin-top: 6px; color: var(--text-muted); }
.rules a { color: var(--ink); text-decoration-color: var(--gold); text-underline-offset: 3px; }
@media (max-width: 900px) { .rules { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .rules { grid-template-columns: minmax(0, 1fr); } }
