/*
 * Guide and landing pages (the free tools add css/tools.css). Loaded after style.css and uses its tokens.
 * The pages themselves are generated by tools/site_pages/build.js in the
 * monorepo: edit the page sources there, not the generated .html files.
 */

/* ── Page hero and breadcrumbs ─────────────────────────────────────── */
.page-hero {
  position: relative; padding: 178px 0 46px; border-bottom: 1px solid var(--line);
  background: radial-gradient(900px 340px at 12% -10%, var(--brand-soft), transparent 70%),
              radial-gradient(700px 300px at 95% 0%, rgba(249, 115, 22, .08), transparent 70%), var(--bg);
}
.page-hero-inner > * { max-width: 900px; }
.page-hero-inner.narrow { max-width: 800px; }
.page-hero h1 { font-size: clamp(32px, 4.6vw, 52px); font-weight: 800; letter-spacing: -.035em; line-height: 1.08; margin: 0 0 16px; }
.page-hero .lead { max-width: 740px; }
.page-meta { margin-top: 18px; font-size: 14px; color: var(--muted); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 18px; font-size: 14px; color: var(--muted); }
.crumbs li + li::before { content: '›'; margin-right: 6px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }

/* ── Sections and reading text ─────────────────────────────────────── */
.page-section { padding: 64px 0; }
.page-section.soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.page-section .section-head { margin-bottom: 36px; }
.prose { max-width: 800px; margin: 0 auto; color: var(--ink-2); font-size: 17px; line-height: 1.75; }
.prose h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -.02em; color: var(--ink); margin: 52px 0 12px; line-height: 1.2; scroll-margin-top: 120px; }
.prose > h2:first-child, .prose > .tldr:first-child + h2 { margin-top: 0; }
.prose > .tldr + h2 { margin-top: 40px; }
.prose h3 { font-size: 20px; color: var(--ink); margin: 30px 0 8px; scroll-margin-top: 120px; }
.prose p, .prose ul, .prose ol { margin: 12px 0; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--brand); font-weight: 700; }
.prose strong, .prose b { color: var(--ink); }
.prose a:not(.btn) { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose code { font: 600 .92em ui-monospace, 'Cascadia Mono', Consolas, monospace; background: var(--bg-soft); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }

.tldr { border: 1px solid var(--line); border-left: 4px solid var(--brand-2); background: var(--card); border-radius: 14px; padding: 18px 22px; box-shadow: var(--shadow-sm); }
.tldr > b:first-child { display: block; font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); margin-bottom: 6px; }
.tldr p { margin: 0; }
.callout { border: 1px solid var(--line); background: var(--bg-soft); border-radius: 14px; padding: 16px 20px; font-size: 15.5px; margin: 20px 0; }
.callout.warn { border-color: rgba(245, 158, 11, .45); background: rgba(245, 158, 11, .08); }
.callout > b:first-child { color: var(--ink); }

.toc { border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; margin: 26px 0 8px; background: var(--card); }
.toc > b { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.toc ol { margin: 8px 0 0; padding-left: 20px; columns: 2; column-gap: 28px; font-size: 15.5px; }
.toc li { margin: 4px 0; break-inside: avoid; }

/* Tables that scroll sideways on a phone instead of squashing. */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; margin: 18px 0; background: var(--card); -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; min-width: 540px; }
table.data th, table.data td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { background: var(--bg-soft); color: var(--ink); font-weight: 700; font-size: 14px; }
table.data tr:last-child td { border-bottom: 0; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data caption { caption-side: bottom; text-align: left; padding: 10px 14px; font-size: 13px; color: var(--muted); }

/* Numbered steps. */
.steps { list-style: none; counter-reset: step; padding: 0 !important; margin: 18px 0; display: grid; gap: 12px; }
.steps li { counter-increment: step; position: relative; padding: 14px 16px 14px 58px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); margin: 0; }
.steps li::before { content: counter(step); position: absolute; left: 14px; top: 13px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 800 14px var(--head); background: var(--brand-soft); color: var(--brand); }

/* Two-up feature list used on the landing pages. */
.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 22px 0; }
.feature-grid .card { padding: 22px; }
.feature-grid h3 { margin: 12px 0 6px; font-size: 18px; }
.feature-grid p { margin: 0; font-size: 15.5px; line-height: 1.6; color: var(--ink-2); }

/* The bill itself is paper: white in both themes. */
.inv-sheet { background: #fff; color: #111827; border-radius: 6px; box-shadow: var(--shadow); border: 1px solid #e5e7eb; padding: 26px; font: 400 12px/1.45 'Inter', Arial, sans-serif; overflow-x: auto; }
.inv-sheet * { color: inherit; }
.inv-sheet .s-head { display: flex; justify-content: space-between; gap: 16px; border-bottom: 2px solid #1d4ed8; padding-bottom: 12px; }
.inv-sheet .s-title { font: 800 18px 'Manrope', 'Inter', sans-serif; color: #1d4ed8; letter-spacing: .04em; text-align: right; }
.inv-sheet .s-seller { flex: 1; min-width: 0; }
.inv-sheet .s-seller > b:first-child { font-size: 15px; display: block; }
.inv-sheet .s-head > div:last-child { flex: none; }
.inv-sheet .muted { color: #4b5563; }
.inv-sheet .s-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 12px 0; }
.inv-sheet .s-box { border: 1px solid #e5e7eb; border-radius: 6px; padding: 8px 10px; }
.inv-sheet .s-box h4 { margin: 0 0 4px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: #6b7280; }
.inv-sheet table { width: 100%; border-collapse: collapse; margin-top: 6px; min-width: 460px; }
.inv-sheet th { background: #eff4ff; color: #1e3a8a; font-size: 10.5px; text-transform: uppercase; letter-spacing: .03em; }
.inv-sheet th, .inv-sheet td { border: 1px solid #e5e7eb; padding: 5px 6px; text-align: left; vertical-align: top; }
.inv-sheet .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.inv-sheet .s-foot { display: grid; grid-template-columns: 1fr 260px; gap: 14px; margin-top: 10px; }
.inv-sheet .s-totals td { border: 0; border-bottom: 1px dashed #e5e7eb; padding: 4px 2px; }
.inv-sheet .s-totals tr.grand td { border-bottom: 0; border-top: 2px solid #111827; font-weight: 800; font-size: 14px; }
.inv-sheet .s-words { margin-top: 8px; font-weight: 600; }
.inv-sheet .s-qr { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.inv-sheet .s-qr canvas { width: 88px; height: 88px; image-rendering: pixelated; }
.inv-sheet .s-sign { margin-top: 30px; text-align: right; }
.inv-sheet .s-sign span { display: inline-block; border-top: 1px solid #9ca3af; padding-top: 4px; min-width: 180px; text-align: center; }
.inv-sheet .s-made { margin-top: 18px; text-align: center; font-size: 9.5px; color: #9ca3af; }

@media (max-width: 900px) {
  .page-hero { padding-top: 150px; }
  .toc ol { columns: 1; }
}
@media (max-width: 640px) {
  .page-hero { padding: 136px 0 34px; }
  .page-section { padding: 44px 0; }
  .prose { font-size: 16px; }
  .feature-grid { grid-template-columns: 1fr; }
  .inv-sheet { padding: 16px; }
  .inv-sheet .s-parties, .inv-sheet .s-foot { grid-template-columns: 1fr; }
}
