/* Shared public content and guided help. All selectors are scoped away from
   receipt geometry and editor controls. No external fonts or dependencies. */
.content-document { margin: 0; background: #f6f9fc; color: #16324b; font: 16px/1.7 Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif; }
.content-document *, #cmr-help * { box-sizing: border-box; }
.content-document a { color: #095caa; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.content-document :focus-visible, #cmr-help :focus-visible { outline: 3px solid #087acb; outline-offset: 4px; }
.content-topbar { max-width: 1200px; padding: 20px 32px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid #dce6ee; }
.content-brand { flex: 0 0 218px; }
.content-brand img { display: block; width: 218px; height: auto; }
.content-topbar nav, .content-footer nav { display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: center; }
.content-topbar nav a, .content-footer a { font-size: .9rem; font-weight: 650; text-decoration: none; padding: 7px 0; }
.content-topbar nav a:hover, .content-footer a:hover { text-decoration: underline; }
.content-footer { max-width: 1136px; margin: 64px auto 0; padding: 32px 0 110px; border-top: 1px solid #dce6ee; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.content-footer p { margin: 0; font-size: .88rem; color: #526a7c; }
.content-footer strong { color: #16324b; font-size: 1rem; }
.content-skip { position: absolute; left: 20px; top: -100px; background: white; padding: 12px; z-index: 10; }
.content-skip:focus { top: 10px; }
.merchant-page { max-width: 1200px; margin: auto; padding: 0 32px; }
.content-hero { max-width: 800px; padding: 72px 0 56px; }
.content-kicker { color: #0864b1; font-weight: 750; font-size: .75rem; letter-spacing: .13em; text-transform: uppercase; }
.content-hero h1 { color: #123657; font-size: clamp(2.4rem, 5vw, 4.2rem); letter-spacing: -.045em; line-height: 1.08; margin: 16px 0 24px; text-wrap: balance; }
.content-hero > p:not(.content-kicker) { font-size: 1.14rem; line-height: 1.75; max-width: 68ch; color: #4c6478; }
.content-document .content-cta, .content-document .cta { display: inline-flex; gap: 24px; align-items: center; padding: 13px 22px; border-radius: 12px; color: white; background: #0968c7; font-weight: 700; text-decoration: none; box-shadow: 0 7px 18px #0968c720; }
.content-document .content-cta:hover, .content-document .cta:hover { background: #074b91; }
.merchant-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.merchant-card { display: flex; flex-direction: column; background: white; border: 1px solid #dce6ee; border-radius: 20px; padding: 28px; text-decoration: none; transition: border-color .18s, box-shadow .18s; }
.merchant-card:hover { border-color: #67abd6; box-shadow: 0 10px 26px #1538570c; }
.merchant-card h2 { color: #16324b; font-size: 1.35rem; letter-spacing: -.025em; line-height: 1.25; margin: 14px 0 8px; }
.merchant-card p { color: #526a7c; font-size: .94rem; line-height: 1.7; margin: 8px 0 24px; }
.merchant-card-link { display: flex; justify-content: space-between; margin-top: auto; font-size: .88rem; font-weight: 700; }
.content-breadcrumb { padding-top: 30px; font-size: .88rem; display: flex; flex-wrap: wrap; gap: 12px; }
.content-breadcrumb + .content-hero { padding-top: 28px; }
.merchant-article { max-width: 780px; }
.merchant-article > section { margin-bottom: 40px; }
.merchant-article h2, .merchant-related > h2, .content-endcap h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.3; letter-spacing: -.025em; }
.merchant-article p, .merchant-article li { color: #415b70; }
.merchant-article li { padding: 5px 0; }
.merchant-example { border: 1px solid #c6e2f4; border-left: 4px solid #0968c7; border-radius: 0 18px 18px 0; padding: 24px 30px; background: #ebf6fd; }
.merchant-example h2 { margin-top: 6px; }
.content-faq { border: 1px solid #dce6ee; border-radius: 14px; margin: 12px 0; background: white; padding: 18px 22px; }
.content-faq summary { cursor: pointer; font-weight: 700; }
.content-faq p { margin-bottom: 0; }
.merchant-related { margin-top: 60px; }
.merchant-related .merchant-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.content-endcap { display: flex; justify-content: space-between; align-items: center; gap: 28px; background: #eaf4fd; border-radius: 20px; margin: 48px 0 28px; padding: 24px 32px; }
.content-endcap h2 { max-width: 24ch; }
.merchant-disclaimer { max-width: 90ch; margin-top: 36px; color: #526a7c; font-size: .84rem; }
.guide-document > main, .guide-document > nav { max-width: 820px; margin: auto; padding: 24px 32px; }
.guide-document > main { min-height: 50vh; padding-top: 40px; }
.guide-document h1 { font-size: clamp(2.25rem, 4vw, 3.4rem); line-height: 1.13; letter-spacing: -.04em; color: #123657; }
.guide-document h2 { line-height: 1.3; letter-spacing: -.025em; }
.guide-document article { padding: 24px 0; border-bottom: 1px solid #dce6ee; }
.guide-document time { color: #526a7c; font-size: .85rem; }
.guide-document aside { background: #eaf4fd; border-radius: 18px; padding: 24px; margin-top: 36px; }
.guide-document img { max-width: 100%; height: auto; }
.guide-document pre { overflow: auto; }
.guide-document table { display: block; overflow: auto; max-width: 100%; }
/* Polish existing Help and homepage discovery without changing the editor. */
.help-page .help-intro { max-width: 70ch; line-height: 1.75; }
.help-page .help-faq { border-color: #dce6ee; box-shadow: 0 3px 12px #15385704; }
.help-page .help-faq[open] { border-color: #a5cce8; background: #fff; }
.help-page .help-faq summary { line-height: 1.55; padding-block: 18px; }
.help-page .help-answer { line-height: 1.8; }
.help-page .help-index { background: #f0f7fc; border-radius: 18px; }
.merchant-discovery { max-width: 1200px; margin: 64px auto; padding: 32px; background: #eef7fe; border: 1px solid #d7e8f5; border-radius: 24px; display: flex; justify-content: space-between; align-items: center; gap: 32px; }
.merchant-discovery h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.2; margin: 10px 0; }
.merchant-discovery p { max-width: 62ch; line-height: 1.7; }
.merchant-discovery .button { flex-shrink: 0; }
/* A static receipt silhouette. Only the eyes blink, over 350ms every 5.8s. */
#cmr-help { font: 14px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif; color: #16324b; }
.cmr-help-launcher { position: fixed; z-index: 80; right: calc(40px + env(safe-area-inset-right)); bottom: calc(32px + env(safe-area-inset-bottom)); width: 78px; height: 82px; border: 0; padding: 3px; background: transparent; cursor: pointer; border-radius: 16px; filter: drop-shadow(0 4px 7px #12365735); }
.cmr-help-launcher:hover { background: #e1f2fc; }
.cmr-mascot { display: block; width: 100%; height: 100%; overflow: hidden; }
.cmr-mascot-eye { transform-box: fill-box; transform-origin: center 85%; animation: cmr-eye-blink 5.8s ease-in-out -4.2s infinite; }
@keyframes cmr-eye-blink { 0%, 94%, 100% { transform: scaleY(1); } 96%, 97% { transform: scaleY(.08); } }
.cmr-help-panel { position: fixed; inset: auto max(22px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) auto; margin: 0; width: 400px; max-width: calc(100vw - 32px); max-height: min(700px, calc(100dvh - 40px)); padding: 0; border: 1px solid #c8dae9; border-radius: 22px; color: #16324b; background: #f8fbfe; box-shadow: 0 22px 80px #16324b30; overflow: hidden; }
.cmr-help-panel[open] { display: flex; flex-direction: column; }
.cmr-help-panel::backdrop { background: #14395725; }
.cmr-help-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 22px; border-bottom: 1px solid #dce6ee; background: white; flex-shrink: 0; }
.cmr-help-eyebrow { color: #526a7c; font-size: .75rem; }
.cmr-help-header h2 { margin: 3px 0 0; color: #123657; font-size: 1.35rem; line-height: 1.3; }
.cmr-help-close { flex: 0 0 44px; width: 44px; height: 44px; border: 1px solid #dce6ee; border-radius: 12px; background: white; color: #16324b; font-size: 1.6rem; cursor: pointer; }
.cmr-help-body { padding: 20px; overflow: auto; overscroll-behavior: contain; min-height: 0; }
.cmr-help-intro { margin: 0 0 18px; color: #526a7c; }
.cmr-help-search label { display: block; font-weight: 700; margin-bottom: 7px; }
.cmr-help-search > div { display: flex; gap: 8px; }
.cmr-help-search input { min-width: 0; width: 100%; font: inherit; font-size: 16px; border: 1px solid #b9ccdc; border-radius: 10px; background: white; color: #16324b; padding: 10px; }
.cmr-help-search button, .cmr-help-again { border: 0; border-radius: 10px; padding: 10px 13px; font: inherit; font-weight: 650; background: #0968c7; color: white; cursor: pointer; min-height: 44px; }
.cmr-help-answer:empty { display: none; }
.cmr-help-answer { margin-top: 18px; padding: 16px; border: 1px solid #c6e2f4; border-radius: 16px 16px 16px 4px; background: #ebf6fd; line-height: 1.7; overflow-wrap: anywhere; }
.cmr-help-answer p { margin: 0 0 12px; }
.cmr-help-answer p:last-child { margin: 0; }
.cmr-help-question-echo { font-weight: 750; }
.cmr-help-answer a, .cmr-help-footer a, .cmr-help-body > a { color: #085baa; text-decoration: underline; text-underline-offset: .18em; }
.cmr-help-again { margin-top: 12px; }
.cmr-help-again[hidden] { display: none; }
.cmr-help-categories { display: flex; flex-wrap: wrap; gap: 7px; margin: 20px 0 14px; }
.cmr-help-categories button { min-height: 40px; border: 1px solid #c8dae9; border-radius: 24px; padding: 8px 12px; background: white; color: #36556c; font: inherit; cursor: pointer; }
.cmr-help-categories button[aria-pressed=true] { background: #123f69; color: white; border-color: #123f69; }
.cmr-help-questions { display: grid; gap: 8px; }
.cmr-help-questions button { display: flex; justify-content: space-between; gap: 14px; text-align: left; border: 1px solid #dce6ee; border-radius: 12px; padding: 13px; background: white; color: #16324b; font: inherit; cursor: pointer; min-height: 46px; }
.cmr-help-questions button:hover { border-color: #5e9fcf; background: #f0f7fd; }
.cmr-help-footer { display: flex; flex-wrap: wrap; gap: 14px; border-top: 1px solid #dce6ee; margin-top: 22px; padding-top: 14px; font-size: .8rem; }
@media (max-width: 900px) {
  .content-topbar { align-items: flex-start; flex-direction: column; gap: 12px; }
  .content-brand { flex-basis: auto; }
  .merchant-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-footer { margin-inline: 32px; }
  .merchant-discovery { margin-inline: 20px; }
}
@media (max-width: 600px) {
  .content-topbar { padding: 16px 20px; }
  .content-brand img { width: 190px; }
  .content-topbar nav { gap: 6px 18px; }
  .merchant-page { padding-inline: 20px; }
  .content-hero { padding: 42px 0 36px; }
  .merchant-grid, .merchant-related .merchant-grid { grid-template-columns: 1fr; }
  .merchant-card { padding: 24px; }
  .merchant-example { padding: 20px; }
  .content-footer { margin-inline: 20px; flex-direction: column; align-items: flex-start; }
  .content-endcap, .merchant-discovery { flex-direction: column; align-items: flex-start; padding: 24px; }
  .guide-document > main, .guide-document > nav { padding-inline: 20px; }
  .cmr-help-launcher { right: calc(20px + env(safe-area-inset-right)); bottom: calc(20px + env(safe-area-inset-bottom)); width: 68px; height: 72px; }
  .cmr-help-panel { right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); }
  .cmr-help-header { padding: 16px; }
  .cmr-help-body { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .cmr-mascot-eye { animation: none; transform: none; }
  .merchant-card { transition: none; }
}
@media print { #cmr-help { display: none; } }

/* Educational analysis sits outside the protected receipt/editor geometry. */
.tax-lens-card { border: 1px solid #c7deee; border-radius: 20px; background: #f0f8fe; color: #16324b; padding: 26px; margin-block: 30px; min-width: 0; }
main > .tax-lens-card { max-width: 1150px; margin: 30px auto; }
.tax-lens-card h2 { margin: 8px 0 12px; font-size: clamp(1.35rem, 2.5vw, 1.8rem); line-height: 1.3; }
.tax-lens-card p { line-height: 1.7; }
.tax-lens-values { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 22px 0; }
.tax-lens-values > div { background: white; border: 1px solid #d8e7f2; border-radius: 12px; padding: 14px; }
.tax-lens-values dt { font-size: .83rem; color: #456276; }
.tax-lens-values dd { margin: 4px 0 0; font-weight: 750; font-size: 1.15rem; overflow-wrap: anywhere; }
.tax-lens-values .tax-lens-rate { background: #123f69; color: white; }
.tax-lens-rate dt { color: #d3e9fa; }
.tax-lens-note { color: #4c6478; font-size: .85rem; }
.tax-lens-reconciliation { font-weight: 650; }
.tax-lens-reconciliation[data-reconciles=false] { color: #7b4c13; }
.tax-lens-card fieldset { border: 0; padding: 0; display: flex; gap: 16px; flex-wrap: wrap; margin-top: 22px; }
.tax-lens-card legend { margin-bottom: 10px; font-size: .85rem; }
.tax-lens-card label { display: grid; gap: 8px; flex: 1 1 160px; min-width: 0; }
.tax-lens-card input { width: 100%; min-width: 0; border: 1px solid #a9c6dd; border-radius: 10px; padding: 12px; font: inherit; font-size: 16px; background: white; color: #16324b; }
.tax-lens-demo-rate { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.tax-lens-demo-rate strong { font-size: 1.9rem; color: #075bac; }
@media (max-width: 680px) { main > .tax-lens-card { margin: 24px 16px; } .tax-lens-card { padding: 20px; } .tax-lens-values { grid-template-columns: repeat(2,minmax(0,1fr)); } }
