/* ============================================================
   SAE Books — marketing site CSS
   Companion to colors_and_type.css. Lifted from the canonical
   ui_kits/marketing/index.html prototype in the design bundle.
   ============================================================ */

/* ── Layout primitives ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
@media (min-width: 768px) { .container { padding: 0 48px; } }

section { padding: 64px 0; }
@media (min-width: 768px) { section { padding: 96px 0; } }
section.band { background: var(--surface); }
section.subtle { background: var(--subtle); }
html.dark section.band, [data-theme="dark"] section.band { background: var(--surface); }

.eyebrow.brand { color: var(--brand-navy); }

/* ── Header ── */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: #ffffff;
  border-bottom: 1px solid var(--border-strong);
}
[data-theme="dark"] .site-header, html.dark .site-header {
  background: #0b1220;
  border-bottom-color: #1f2937;
}
.site-header .row {
  display: flex; align-items: center; gap: 24px;
  height: 68px;
}
.wordmark { display: inline-flex; align-items: center; }
.wordmark img { height: 36px; width: auto; display: block; }
[data-theme="dark"] .wordmark img, html.dark .wordmark img {
  background: #fff; padding: 4px 8px; border-radius: 6px;
}
nav.primary { display: none; gap: 28px; margin-left: 12px; }
@media (min-width: 1024px) { nav.primary { display: flex; } }
nav.primary a {
  font-size: 14px; font-weight: 700; color: #0b1220;
  position: relative;
}
nav.primary a:hover { color: var(--brand-navy); text-decoration: none; }
[data-theme="dark"] nav.primary a, html.dark nav.primary a { color: #ffffff; font-weight: 600; }
[data-theme="dark"] nav.primary a:hover, html.dark nav.primary a:hover { color: #a8bbe8; }
.header-spacer { flex: 1; }
.header-actions { display: flex; align-items: center; gap: 8px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  font-family: var(--font-sans); font-weight: 600; font-size: 14px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--brand-navy); color: #fff; }
.btn-primary:hover { background: var(--brand-navy-700); color: #fff; text-decoration: none; }
.btn-secondary {
  background: var(--surface); color: var(--ink);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--page); border-color: var(--ink); color: var(--ink); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--body); }
.btn-ghost:hover { color: var(--ink); text-decoration: none; }
.btn-lg { padding: 14px 24px; font-size: 15px; }
.btn-icon { padding: 8px; }
.btn:active { transform: translateY(1px); }

/* ── Hero ── */
.hero { padding: 56px 0 80px; }
@media (min-width: 1024px) { .hero { padding: 80px 0 120px; } }
.hero-grid {
  display: grid; gap: 48px;
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: 1.1fr 1fr; gap: 64px; }
}
.hero h1 {
  font-size: var(--fs-display);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-bottom: 20px;
}
.hero h1 .red {
  color: var(--brand-red);
  font-family: 'Brush Script MT', 'Bradley Hand', cursive;
  font-style: italic;
  font-weight: 700;
}
.hero .lead { max-width: 540px; margin-bottom: 32px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; color: var(--muted); }
.hero-meta .pill {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: var(--radius-pill);
  padding: 4px 12px; background: var(--surface);
}
.hero-meta .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 2px rgba(0,170,85,0.18); }

/* Hero screenshot */
.hero-screenshot {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  border: 1px solid var(--border);
}
.hs-chrome {
  height: 32px; background: var(--subtle);
  display: flex; align-items: center; gap: 6px; padding: 0 12px;
  border-bottom: 1px solid var(--border);
}
.hs-chrome span { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.hs-chrome .url { margin-left: 8px; font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.hs-body { padding: 18px; }
.hs-h { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.hs-h .meta { font-size: 11px; color: var(--muted); font-weight: 400; }
.hs-table { width: 100%; border-collapse: collapse; font-size: 11px; font-family: var(--font-mono); }
.hs-table th, .hs-table td { padding: 4px 8px; border-bottom: 1px solid var(--border); }
.hs-table th { font-family: var(--font-sans); font-size: 10px; text-transform: uppercase; color: var(--muted); font-weight: 600; letter-spacing: 0.04em; text-align: left; }
.hs-table .num { text-align: right; }
.hs-table .section td { background: var(--subtle); font-family: var(--font-sans); font-weight: 600; font-size: 10px; text-transform: uppercase; color: var(--success); letter-spacing: 0.04em; padding: 6px 8px; }
.hs-total td { border-top: 2px solid var(--ink); font-weight: 700; padding-top: 6px; }

/* hero-screenshot — API request/response variant */
.hs-body.hs-code { padding: 0; display: grid; grid-template-columns: 1fr; }
.hs-body.hs-code pre {
  margin: 0;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--surface);
  white-space: pre;
  overflow-x: auto;
}
.hs-body.hs-code .hs-req { border-bottom: 1px dashed var(--border); }
.hs-body.hs-code .hs-res { background: var(--subtle); }
.hs-body.hs-code .hs-c { color: var(--muted); font-style: italic; }
.hs-body.hs-code .hs-k { color: var(--brand-navy); font-weight: 600; }
.hs-body.hs-code .hs-s { color: var(--success); }
.hs-body.hs-code .hs-n { color: var(--brand-red); }
@media (min-width: 900px) {
  .hs-body.hs-code { grid-template-columns: 1fr; }
}

/* ── Three-up ── */
.three-up { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .three-up { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
.point { padding: 0; }
.point .icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  background: var(--brand-navy-50);
  color: var(--brand-navy);
  margin-bottom: 16px;
}
.point h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.point p { color: var(--body); font-size: 15px; line-height: 1.55; margin: 0; }

/* ── Feature grid ── */
.feature-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .feature-grid { grid-template-columns: repeat(4, 1fr); } }
.tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color var(--t-fast);
  position: relative;
}
.tile:hover { border-color: var(--border-strong); }
.tile .icon { width: 28px; height: 28px; color: var(--brand-navy); margin-bottom: 14px; }
.tile h4 { font-size: 15px; font-weight: 600; margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tile p { font-size: 14px; color: var(--body); line-height: 1.5; margin: 0; }
.tile .badge {
  font-size: 10px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-red);
  background: var(--brand-red-50);
  padding: 2px 6px; border-radius: 4px;
  flex-shrink: 0;
}
.tile .badge.ent {
  color: #fff;
  background: var(--brand-navy);
}

/* ── Pricing tiers ── */
.tiers-wrap { max-width: 1350px; margin: 0 auto; }
.tiers-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 768px)  { .tiers-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .tiers-grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 599px)  { .tiers-grid { grid-template-columns: 1fr; } }
.tier {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px 24px;
  display: flex; flex-direction: column;
  position: relative;
}
.tier.popular {
  border-color: var(--brand-navy);
  box-shadow: 0 0 0 1px var(--brand-navy), var(--shadow-card);
}
.tier.popular::before {
  content: "Most popular";
  position: absolute; top: -10px; left: 24px;
  background: var(--brand-navy); color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 999px;
}
.tier.enterprise { background: var(--brand-navy); color: #f3f4f6; border-color: var(--brand-navy); }
.tier-name { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-navy); margin-bottom: 14px; }
.tier.enterprise .tier-name { color: #93a5d6; }
.tier-price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 6px; }
.tier-price .amount { font-size: 36px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; line-height: 1; }
.tier.enterprise .tier-price .amount { color: #fff; }
.tier-price .per { font-size: 14px; color: var(--muted); font-weight: 500; }
.tier.enterprise .tier-price .per { color: #c9d1e3; }
.tier-price .free { font-size: 30px; font-weight: 800; color: var(--success); letter-spacing: -0.02em; }
.tier-tagline { font-size: 14px; color: var(--body); margin-bottom: 20px; line-height: 1.5; min-height: 42px; }
.tier.enterprise .tier-tagline { color: #d1d5db; }
.tier .btn { width: 100%; justify-content: center; margin-bottom: 18px; }
.tier.enterprise .btn-secondary { background: #fff; color: var(--brand-navy); border-color: #fff; }
.tier.enterprise .btn-secondary:hover { background: var(--brand-navy-50); color: var(--brand-navy); }
.tier-feats { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.tier-feats li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--body); line-height: 1.5; }
.tier.enterprise .tier-feats li { color: #d1d5db; }
.tier-feats svg { flex-shrink: 0; width: 16px; height: 16px; margin-top: 3px; stroke: var(--success); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.tier.enterprise .tier-feats svg { stroke: #93a5d6; }
.tier-feats .group { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--border); display: block; }
.tier-feats .group:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.tier.enterprise .tier-feats .group { color: #93a5d6; border-top-color: #2a3a6b; }
.tier-foot { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.tier.enterprise .tier-foot { color: #93a5d6; border-top-color: #2a3a6b; }

/* ── Screenshots row ── */
.shots-row { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .shots-row { grid-template-columns: repeat(3, 1fr); } }
.shot { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.shot-img {
  aspect-ratio: 16 / 10;
  background: var(--subtle);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 13px; font-family: var(--font-mono);
  border-bottom: 1px solid var(--border);
  background-image:
    linear-gradient(45deg, var(--border) 25%, transparent 25%, transparent 75%, var(--border) 75%),
    linear-gradient(45deg, var(--border) 25%, transparent 25%, transparent 75%, var(--border) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 8px 8px;
  opacity: 0.6;
}
.shot-cap { padding: 14px 18px; }
.shot-cap h4 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.shot-cap p { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.5; }

/* Inline UI mocks for the Anatomy section */
.shot-mock {
  aspect-ratio: 16 / 10;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.55;
  color: var(--ink);
  padding: 12px 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sm-row {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 0;
  border-bottom: 1px dashed var(--border);
  white-space: nowrap;
}
.sm-row:last-child { border-bottom: none; }
.sm-method {
  font-weight: 700; font-size: 9px; letter-spacing: 0.05em;
  padding: 1px 5px; border-radius: 3px; flex-shrink: 0;
  font-family: var(--font-sans);
}
.sm-method.get { color: var(--brand-navy); background: var(--brand-navy-50); }
.sm-method.post { color: var(--success); background: rgba(0,170,85,0.12); }
.sm-method.put { color: #92400e; background: rgba(245,158,11,0.18); }
.sm-method.del { color: var(--brand-red); background: var(--brand-red-50); }
.sm-path { color: var(--ink); }
.sm-row.sm-expanded { background: var(--subtle); margin: 0 -14px; padding: 4px 14px; border-radius: 0; }
.sm-param { padding-left: 64px; color: var(--muted); font-size: 10px; padding-top: 2px; padding-bottom: 2px; border: none; }
.sm-param .sm-key { color: var(--ink); }
.sm-param .sm-req { color: var(--brand-red); font-size: 9px; margin-left: 4px; }

/* webhook deliveries */
.sm-time { color: var(--muted); width: 56px; flex-shrink: 0; }
.sm-evt { color: var(--brand-navy); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sm-id { color: var(--muted); font-size: 9.5px; }
.sm-status { font-weight: 600; font-size: 9.5px; padding: 1px 5px; border-radius: 3px; flex-shrink: 0; font-family: var(--font-sans); letter-spacing: 0.04em; }
.sm-status.ok { color: var(--success); background: rgba(0,170,85,0.12); }
.sm-status.warn { color: #92400e; background: rgba(245,158,11,0.18); }
.sm-status.err { color: var(--brand-red); background: var(--brand-red-50); }
.sm-lat { color: var(--muted); width: 36px; text-align: right; flex-shrink: 0; }

/* audit ledger */
.sm-entry { padding: 5px 0; border-bottom: 1px dashed var(--border); display: flex; gap: 8px; }
.sm-entry:last-child { border-bottom: none; }
.sm-avatar { width: 22px; height: 22px; border-radius: 50%; background: var(--brand-navy); color: #fff; font-family: var(--font-sans); font-weight: 700; font-size: 9.5px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sm-avatar.api { background: var(--success); }
.sm-avatar.bot { background: var(--brand-red); }
.sm-entry-body { flex: 1; min-width: 0; }
.sm-entry-h { display: flex; gap: 8px; align-items: baseline; }
.sm-actor { font-family: var(--font-sans); font-weight: 600; color: var(--ink); font-size: 11px; }
.sm-stamp { color: var(--muted); font-size: 9.5px; }
.sm-act { color: var(--body); font-size: 10px; }
.sm-diff-old { color: var(--brand-red); text-decoration: line-through; }
.sm-diff-new { color: var(--success); }

/* ── Split (self-host vs hosted) ── */
.split { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .split { grid-template-columns: 1fr 1fr; gap: 48px; } }
.split-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.split-card .icon { color: var(--brand-navy); margin-bottom: 14px; }
.split-card h3 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.split-card p { color: var(--body); margin-bottom: 16px; }
.split-card pre {
  background: #111827; color: #e5e7eb;
  font-family: var(--font-mono); font-size: 12px;
  padding: 12px 14px; border-radius: var(--radius);
  overflow-x: auto;
  margin-bottom: 16px;
}

/* ── Quote ── */
.quote-block { max-width: 760px; margin: 0 auto; text-align: center; }
.quote-block blockquote {
  font-size: 22px; font-weight: 500; line-height: 1.4;
  color: var(--ink);
  margin: 0 0 16px;
  font-family: var(--font-sans);
  text-wrap: balance;
}
.quote-block blockquote::before { content: "\201C"; font-size: 56px; line-height: 0; vertical-align: -16px; color: var(--border-strong); margin-right: 4px; }
.quote-block blockquote::after { content: "\201D"; font-size: 56px; line-height: 0; vertical-align: -28px; color: var(--border-strong); margin-left: 2px; }
.quote-block .attr { font-size: 13px; color: var(--muted); }
.quote-placeholder { color: var(--muted); font-style: italic; }

/* ── FAQ ── */
.faq-wrap { max-width: 760px; margin: 0 auto; }
details.faq { border-bottom: 1px solid var(--border); padding: 20px 0; }
details.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-size: 17px; font-weight: 600; color: var(--ink);
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary .chev { color: var(--muted); transition: transform var(--t-fast); flex-shrink: 0; }
details.faq[open] summary .chev { transform: rotate(180deg); }
details.faq[open] summary { margin-bottom: 12px; }
details.faq p { color: var(--body); margin: 0; line-height: 1.6; font-size: 15px; }

/* ── Footer ── */
footer.site {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 56px 0 32px;
}
.foot-grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .foot-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.foot-col h5 { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.foot-col a { font-size: 14px; color: var(--body); }
.foot-col a:hover { color: var(--ink); text-decoration: none; }
.foot-bottom {
  margin-top: 40px; padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 12px; color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between;
}
.foot-brand .blurb { font-size: 14px; color: var(--body); margin-top: 12px; max-width: 320px; line-height: 1.55; }

/* ── Mobile sticky CTA bar ── */
.mobile-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  display: flex; gap: 8px;
}
[data-theme="dark"] .mobile-cta, html.dark .mobile-cta { background: rgba(11, 15, 26, 0.94); }
.mobile-cta .btn { flex: 1; justify-content: center; }
@media (min-width: 1024px) { .mobile-cta { display: none; } }
body { padding-bottom: 72px; }
@media (min-width: 1024px) { body { padding-bottom: 0; } }

/* ── Section heading helper ── */
.sh { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.sh .eyebrow { margin-bottom: 12px; display: block; }
.sh h2 { margin-bottom: 12px; }
.sh p { color: var(--body); font-size: 17px; margin: 0; }

/* ── Theme switch (segmented Light / Auto / Dark) ── */
.theme-switch {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--subtle);
  gap: 0;
}
.theme-switch button {
  width: 32px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--t-fast);
  padding: 0;
  font-family: inherit;
}
.theme-switch button:hover { color: var(--ink); }
.theme-switch button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--brand-navy);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
[data-theme="dark"] .theme-switch button[aria-pressed="true"],
html.dark .theme-switch button[aria-pressed="true"] { color: #93a5d6; }
.theme-switch svg { width: 14px; height: 14px; }

/* SVG icon defaults */
svg.lucide { width: 1em; height: 1em; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.icon svg.lucide { width: 100%; height: 100%; }

/* ── Hide Typhoon's default chrome on the marketing pages ── */
body.homepage .header,
body.homepage > .container.shadow,
body.docs-page .header,
body.docs-page > .container.shadow {
  display: none !important;
}
body.homepage,
body.docs-page {
  padding: 0 !important;
  margin: 0;
  background: var(--page);
  color: var(--body);
}
body.homepage { padding-bottom: 72px !important; }
@media (min-width: 1024px) { body.homepage { padding-bottom: 0 !important; } }

/* ── Cashbook subpage — suppress Typhoon chrome, same as homepage ── */
body.cashbook-page .header,
body.cashbook-page > .container.shadow {
  display: none !important;
}
body.cashbook-page {
  padding: 0 !important;
  margin: 0;
  background: var(--page);
  color: var(--body);
}
body.cashbook-page { padding-bottom: 72px !important; }
@media (min-width: 1024px) { body.cashbook-page { padding-bottom: 0 !important; } }

/* ── Cashbook subpage — cashbook-hero ── */
.cashbook-hero {
  padding: 80px 0 72px;
  background: linear-gradient(135deg, var(--brand-navy) 0%, #1a2f6e 100%);
  color: #fff;
}
.cashbook-hero h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; line-height: 1.15; color: #fff; margin-bottom: 20px; letter-spacing: -0.02em; }
.cashbook-hero .lead { font-size: clamp(1rem, 1.5vw, 1.2rem); color: rgba(255,255,255,0.85); max-width: 640px; line-height: 1.6; margin-bottom: 32px; }
.cashbook-hero .hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.cashbook-hero .btn-primary { background: #fff; color: var(--brand-navy); border-color: #fff; font-weight: 700; }
.cashbook-hero .btn-primary:hover { background: #e8edf8; }
.cashbook-hero .btn-secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,0.5); }
.cashbook-hero .btn-secondary:hover { border-color: #fff; background: rgba(255,255,255,0.1); }
.cashbook-hero .hero-meta { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; }
.cashbook-hero .pill { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.9); border-color: rgba(255,255,255,0.2); }

/* ── Cashbook feature tiles ── */
.cashbook-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (min-width: 768px) { .cashbook-tiles { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 599px) { .cashbook-tiles { grid-template-columns: 1fr; } }
.cashbook-tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.cashbook-tile .icon { width: 36px; height: 36px; margin-bottom: 14px; color: var(--brand-navy); }
.cashbook-tile h4 { font-size: 15px; font-weight: 700; margin-bottom: 8px; color: var(--ink); }
.cashbook-tile p { font-size: 14px; color: var(--body); line-height: 1.6; margin: 0; }

/* ── Upgrade arc ── */
.upgrade-arc { background: var(--brand-navy); color: #fff; border-radius: var(--radius); padding: 48px 40px; margin-top: 0; }
.upgrade-arc h3 { font-size: 1.4rem; font-weight: 800; color: #fff; margin-bottom: 16px; }
.upgrade-arc p { color: rgba(255,255,255,0.85); line-height: 1.7; margin-bottom: 0; }
.upgrade-arc .btn { margin-top: 24px; background: #fff; color: var(--brand-navy); border-color: #fff; font-weight: 700; display: inline-flex; }
.upgrade-arc .btn:hover { background: #e8edf8; }

/* ── Product screenshots (shared: /self-host, /product, homepage teaser) ── */
.shot-frame { border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-card); background: var(--surface); margin: 0; }
.shot-frame img { display: block; width: 100%; height: auto; }
.shot-frame figcaption { font-size: var(--fs-small); color: var(--muted);
  padding: 12px 16px; border-top: 1px solid var(--border); margin: 0; }

/* ── Clickable product screenshots: subtle "Open live" affordance on hover ── */
.shot-frame a { position: relative; display: block; }
.shot-frame a::after {
  content: "Open live \2197"; position: absolute; top: 12px; right: 12px;
  background: rgba(25, 66, 145, 0.94); color: #fff; font: 600 12px/1 var(--font-sans);
  padding: 6px 11px; border-radius: var(--radius-pill); letter-spacing: 0.01em;
  opacity: 0; transform: translateY(-4px); pointer-events: none;
  transition: opacity var(--t-fast), transform var(--t-fast);
}
.shot-frame a:hover::after { opacity: 1; transform: translateY(0); }
.shot-frame a img { transition: filter var(--t-fast); }
.shot-frame a:hover img { filter: brightness(0.97); }

/* ── Theme-matched screenshots: show the light or dark capture to match theme ── */
.shot-frame .shot-dark { display: none; }
[data-theme="dark"] .shot-frame .shot-light,
html.dark .shot-frame .shot-light { display: none; }
[data-theme="dark"] .shot-frame .shot-dark,
html.dark .shot-frame .shot-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .shot-frame .shot-light { display: none; }
  :root:not([data-theme="light"]) .shot-frame .shot-dark { display: block; }
}

/* ── Code blocks: markdown/plain <pre> must scroll within its column, never
   widen the page on narrow viewports (caught a 718px self-host mobile blowout). ── */
pre { max-width: 100%; overflow-x: auto; }

/* ── Product page tour + self-host install (moved out of page markdown 2026-06-29.
   An inline <style> as the FIRST block of a Grav markdown body gets HTML-escaped
   by Parsedown and renders as visible text — it broke /product. Page CSS belongs
   here, not in the markdown body.) ── */
.tour { max-width: 1080px; margin: 0 auto; }
.tour-row { display: grid; gap: 28px; align-items: center; grid-template-columns: 1fr; margin: 0 0 64px; }
@media (min-width: 900px) {
  .tour-row { grid-template-columns: 1fr 1fr; gap: 48px; }
  .tour-row.flip .tour-text { order: 2; }
  .tour-row.flip .tour-shot { order: 1; }
}
.tour-text h2 { font-size: var(--fs-h3); margin: 8px 0 10px; line-height: 1.2; }
.tour-text .big { font-size: var(--fs-h2); }
.tour-text p { color: var(--body); font-size: 1.02rem; line-height: 1.6; margin: 0 0 10px; }
.tour-text .note { font-size: var(--fs-small); color: var(--muted); }
.tour-shots-2 { display: grid; gap: 18px; grid-template-columns: 1fr; }
.payroll-callout { max-width: 1080px; margin: 0 auto 64px; padding: 22px 26px; border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); background: var(--subtle); display: flex; gap: 16px; align-items: flex-start; }
.payroll-callout .icon { color: var(--brand-navy); flex-shrink: 0; }
[data-theme="dark"] .payroll-callout .icon, html.dark .payroll-callout .icon { color: #93a5d6; }
.payroll-callout h3 { margin: 0 0 4px; font-size: 1.05rem; }
.payroll-callout p { margin: 0; color: var(--body); font-size: 0.95rem; line-height: 1.55; }
.shots-grid { display: grid; gap: 24px; grid-template-columns: 1fr; margin-top: 8px; }
@media (min-width: 900px) { .shots-grid { grid-template-columns: 1fr 1fr; } }
.install { max-width: 820px; margin: 0 auto; }
.install pre { background: var(--page); color: var(--ink); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 20px 22px; overflow-x: auto; font-family: var(--font-mono); font-size: 13.5px; line-height: 1.7; margin: 0 0 18px; }
.install pre .c { color: var(--muted); }
.install ol { counter-reset: step; list-style: none; padding: 0; margin: 0 0 28px; }
.install ol > li { position: relative; padding: 0 0 18px 44px; margin: 0; color: var(--body); line-height: 1.6; }
.install ol > li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: -2px; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-navy-50); color: var(--brand-navy); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; font-family: var(--font-mono); }
[data-theme="dark"] .install ol > li::before, html.dark .install ol > li::before { color: #93a5d6; }
.install ol > li strong { color: var(--ink); }
.install code, .lede code { font-family: var(--font-mono); font-size: 0.88em; background: var(--subtle); padding: 1px 6px; border-radius: 5px; }
.self-host-page .hero .lead { max-width: 600px; }
