/* Shared styles for the guide, audience and free-account pages.
   The older pages (index, qr, about...) keep their own inline styles; the
   tokens, nav and footer here match them. */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --navy: #0F2341;
  --navy-mid: #1A3766;
  --blue: #2E86C1;
  --blue-light: #5DADE2;
  --orange: #E8862A;
  --orange-light: #F5A623;
  --surface: #F4F6FA;
  --surface-dim: #E8ECF2;
  --text: #1A1F2E;
  --text-muted: #5A6578;
  --white: #FFFFFF;
  --invoice-accent: #059669;
  --pdf-accent: #2E86C1;
  --credit-accent: #0891B2;
  --qr-accent: #7C3AED;
  --accent: var(--blue);
  --font-display: 'DM Sans', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --max-w: 1200px;
  --read-w: 740px;
  --radius: 16px;
  --radius-sm: 10px;
}
.t-qr { --accent: var(--qr-accent); }
.t-invoice { --accent: var(--invoice-accent); }
.t-pdf { --accent: var(--pdf-accent); }
.t-credit { --accent: var(--credit-accent); }

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body); color: var(--text); background: var(--white);
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: var(--read-w); margin: 0 auto; }
a { color: var(--blue); }

/* ─── NAV (same as the homepage) ─── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(15,35,65,0.06);
  transition: box-shadow 0.3s;
}
.nav.scrolled { box-shadow: 0 4px 30px rgba(15,35,65,0.08); }
.nav-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 80px;
}
.nav-brand { display: flex; align-items: center; text-decoration: none; color: var(--navy); position: relative; }
.nav-logo {
  width: 195px; height: 195px; object-fit: contain; position: relative; top: 38px;
  filter: drop-shadow(0 8px 24px rgba(15,35,65,0.18));
}
.nav-wordmark {
  font-family: var(--font-display); font-weight: 800; font-size: 2.475rem;
  letter-spacing: -0.02em; margin-left: -30px;
}
.nav-wordmark span { color: var(--blue); }
.nav-wordmark em { font-style: normal; color: var(--orange); }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { font-size: 0.9rem; font-weight: 500; color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--navy); }
.nav-cta {
  background: var(--navy); color: var(--white) !important; padding: 10px 22px; border-radius: 50px;
  font-weight: 600 !important; font-size: 0.85rem !important; transition: background 0.2s, transform 0.2s;
}
.nav-cta:hover { background: var(--navy-mid); transform: translateY(-1px); }
.nav-hamburger { display: none; background: none; border: none; cursor: pointer; width: 36px; height: 36px; position: relative; }
.nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--navy); position: absolute; left: 7px; transition: all 0.3s; }
.nav-hamburger span:nth-child(1) { top: 10px; }
.nav-hamburger span:nth-child(2) { top: 17px; }
.nav-hamburger span:nth-child(3) { top: 24px; }
.nav-hamburger.open span:nth-child(1) { top: 17px; transform: rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { top: 17px; transform: rotate(-45deg); }
.mobile-menu {
  display: none; position: fixed; top: 72px; left: 0; right: 0; background: var(--white); padding: 24px;
  box-shadow: 0 20px 40px rgba(15,35,65,0.1); flex-direction: column; gap: 16px; z-index: 99;
}
.mobile-menu.open { display: flex; }
.mobile-menu a { font-size: 1.05rem; font-weight: 500; color: var(--text); text-decoration: none; padding: 12px 0; border-bottom: 1px solid var(--surface); }

/* ─── PAGE HEADER ─── */
.page-head {
  background: var(--navy); color: var(--white); padding: 150px 0 64px; position: relative; overflow: hidden;
}
.page-head::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 60% at 80% 30%, rgba(46,134,193,0.16), transparent),
              radial-gradient(ellipse 50% 50% at 10% 90%, rgba(232,134,42,0.10), transparent);
}
.page-head .container { position: relative; }
.crumbs { font-size: 0.82rem; color: rgba(255,255,255,0.55); margin-bottom: 18px; }
.crumbs a { color: rgba(255,255,255,0.75); text-decoration: none; }
.crumbs a:hover { color: var(--white); text-decoration: underline; }
.crumbs span[aria-hidden] { margin: 0 6px; }
.eyebrow {
  display: inline-block; font-family: var(--font-display); font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--orange-light); margin-bottom: 14px;
}
.page-head h1 {
  font-family: var(--font-display); font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 800;
  line-height: 1.12; letter-spacing: -0.03em; margin-bottom: 18px; max-width: 860px;
}
.page-head .lede { font-size: 1.12rem; line-height: 1.7; color: rgba(255,255,255,0.72); max-width: 700px; }
.page-head .meta { margin-top: 20px; font-size: 0.85rem; color: rgba(255,255,255,0.5); }
.head-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }

/* ─── BUTTONS ─── */
.btn-primary, .btn-secondary, .btn-ghost {
  display: inline-flex; align-items: center; gap: 8px; padding: 14px 30px; border-radius: 50px;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn-primary { background: var(--orange); color: var(--white); border: none; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(232,134,42,0.35); }
.btn-secondary { background: rgba(255,255,255,0.08); color: var(--white); border: 1px solid rgba(255,255,255,0.2); }
.btn-secondary:hover { background: rgba(255,255,255,0.14); }
.btn-ghost { background: var(--white); color: var(--navy); border: 1px solid var(--surface-dim); }
.btn-ghost:hover { border-color: var(--navy); }
.btn-primary svg, .btn-ghost svg { width: 18px; height: 18px; }

/* ─── ARTICLE ─── */
.article { padding: 64px 0 40px; }
.prose { font-size: 1.05rem; line-height: 1.8; color: var(--text); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 {
  font-family: var(--font-display); font-size: 1.65rem; font-weight: 800; letter-spacing: -0.02em;
  color: var(--navy); margin-top: 2.2em; line-height: 1.25;
}
.prose h3 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; color: var(--navy); margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.45em; }
.prose strong { color: var(--navy); }
.prose code { background: var(--surface); padding: 2px 6px; border-radius: 6px; font-size: 0.92em; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--surface-dim); vertical-align: top; }
.prose th { background: var(--surface); font-family: var(--font-display); color: var(--navy); }
.prose .steps { list-style: none; padding: 0; counter-reset: step; }
.prose .steps > li { counter-increment: step; position: relative; padding-left: 52px; margin-top: 1.2em; }
.prose .steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: var(--white); font-family: var(--font-display); font-weight: 800;
  display: flex; align-items: center; justify-content: center; font-size: 0.95rem;
}
.note {
  background: var(--surface); border-left: 4px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px; font-size: 0.97rem; line-height: 1.7;
}
.note.disclaimer { border-left-color: var(--text-muted); font-size: 0.9rem; color: var(--text-muted); }
.toc { background: var(--surface); border-radius: var(--radius); padding: 20px 24px; font-size: 0.95rem; }
.toc strong { display: block; font-family: var(--font-display); margin-bottom: 8px; }
.toc ol { padding-left: 1.2em; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* ─── CALLOUT: try the tool ─── */
.tool-cta {
  margin: 2.4em 0; border-radius: var(--radius); padding: 28px 30px; color: var(--white);
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  display: grid; grid-template-columns: 88px 1fr; gap: 22px; align-items: center; position: relative; overflow: hidden;
}
.tool-cta::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--accent); }
.tool-cta img { width: 88px; height: 88px; object-fit: contain; background: var(--white); border-radius: 18px; padding: 6px; }
.tool-cta h3 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 800; margin-bottom: 6px; color: var(--white); }
.tool-cta p { font-size: 0.95rem; line-height: 1.6; color: rgba(255,255,255,0.72); margin-bottom: 14px; }
.tool-cta .cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.tool-cta .btn-primary, .tool-cta .btn-secondary { padding: 11px 22px; font-size: 0.93rem; }

/* ─── SAMPLE INVOICE (template pages) ─── */
.invoice-sample { border: 1px solid var(--surface-dim); border-radius: var(--radius); padding: 28px; background: var(--white);
  box-shadow: 0 10px 34px rgba(15,35,65,0.07); font-size: 0.93rem; line-height: 1.55; }
.invoice-sample .inv-top { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.invoice-sample .inv-title { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; color: var(--accent); letter-spacing: 0.02em; }
.invoice-sample .inv-meta { text-align: right; color: var(--text-muted); }
.invoice-sample .inv-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 18px; }
.invoice-sample .inv-label { display: block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 2px; }
.invoice-sample table { display: table; width: 100%; font-size: 0.9rem; }
.invoice-sample td.num, .invoice-sample th.num { text-align: right; white-space: nowrap; }
.invoice-sample .inv-totals { margin-left: auto; width: min(100%, 300px); margin-top: 12px; }
.invoice-sample .inv-totals div { display: flex; justify-content: space-between; padding: 4px 0; }
.invoice-sample .inv-totals .grand { border-top: 2px solid var(--navy); margin-top: 6px; padding-top: 8px; font-weight: 800; color: var(--navy); }
.invoice-sample .inv-notes { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--surface-dim); color: var(--text-muted); font-size: 0.88rem; }
@media (max-width: 560px) { .invoice-sample { padding: 16px; overflow-x: auto; } .invoice-sample table { font-size: 0.8rem; } .invoice-sample th, .invoice-sample td { padding: 8px 5px; } .invoice-sample .inv-parties { grid-template-columns: 1fr; } .invoice-sample .inv-meta { text-align: left; } }

/* ─── PAGES INSIDE A TOOL (PDF guides) ─── */
.in-app .page-head.in-app { padding: 44px 0 44px; }
.app-bar { position: sticky; top: 64px; z-index: 90; background: var(--white); border-bottom: 1px solid var(--surface-dim); }
.app-bar .container { display: flex; align-items: center; gap: 24px; height: 48px; overflow-x: auto; }
.app-bar-name { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; color: var(--navy); text-decoration: none; white-space: nowrap; font-size: 0.95rem; }
.app-bar-name img { width: 28px; height: 28px; object-fit: contain; }
.app-bar nav { display: flex; gap: 20px; margin: 0 auto; }
.app-bar nav a { color: var(--text-muted); text-decoration: none; font-size: 0.88rem; white-space: nowrap; }
.app-bar nav a:hover, .app-bar nav a[aria-current="page"] { color: var(--navy); }
.app-bar nav a[aria-current="page"] { font-weight: 600; }
.prose figure.shot { margin: 1.4em 0; }
.prose figure.shot img { width: 100%; height: auto; border: 1px solid var(--surface-dim); border-radius: var(--radius-sm); box-shadow: 0 8px 26px rgba(15,35,65,0.08); }
.prose figure.shot figcaption { font-size: 0.88rem; color: var(--text-muted); margin-top: 8px; text-align: center; }
@media (max-width: 700px) { .app-bar nav { margin: 0; } .in-app .page-head.in-app { padding: 32px 0; } }

/* ─── FAQ ─── */
.faq { padding: 20px 0 40px; }
.faq h2 { font-family: var(--font-display); font-size: 1.65rem; font-weight: 800; color: var(--navy); margin-bottom: 18px; }
.faq details { border-bottom: 1px solid var(--surface-dim); padding: 16px 0; }
.faq summary {
  cursor: pointer; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--navy);
  list-style: none; display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.4rem; line-height: 1; color: var(--accent); }
.faq details[open] summary::after { content: '\2212'; }
.faq details p { margin-top: 10px; line-height: 1.75; color: var(--text-muted); }

/* ─── CARD GRIDS (hub pages) ─── */
.section { padding: 72px 0; }
.section.alt { background: var(--surface); }
.section-head { text-align: center; margin-bottom: 44px; }
.section-head h2 {
  font-family: var(--font-display); font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 800;
  letter-spacing: -0.03em; color: var(--navy); margin-bottom: 12px;
}
.section-head p { font-size: 1.05rem; color: var(--text-muted); max-width: 620px; margin: 0 auto; line-height: 1.6; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.cards.two { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--white); border: 1px solid rgba(15,35,65,0.08); border-radius: var(--radius); padding: 26px;
  text-decoration: none; color: inherit; display: flex; flex-direction: column; position: relative; overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1), box-shadow 0.3s;
}
.card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--accent); }
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 44px rgba(15,35,65,0.10); }
.card .tag { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 10px; }
.card h3 { font-family: var(--font-display); font-size: 1.18rem; font-weight: 700; color: var(--navy); margin-bottom: 8px; line-height: 1.3; }
.card p { font-size: 0.93rem; line-height: 1.6; color: var(--text-muted); flex: 1; }
.card .more { margin-top: 16px; font-weight: 600; font-size: 0.9rem; color: var(--accent); }
.card img.card-icon { width: 64px; height: 64px; object-fit: contain; margin-bottom: 14px; }

/* ─── COMPARISON TABLE ─── */
.compare { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--white); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--surface-dim); }
.compare th, .compare td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--surface-dim); font-size: 0.95rem; line-height: 1.5; vertical-align: top; }
.compare thead th { background: var(--navy); color: var(--white); font-family: var(--font-display); }
.compare tbody th { font-family: var(--font-display); color: var(--navy); width: 22%; }
.compare tr:last-child td, .compare tr:last-child th { border-bottom: none; }
.compare-wrap { overflow-x: auto; }

/* ─── RELATED + CLOSING CTA ─── */
.related { padding: 56px 0; background: var(--surface); }
.related h2 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; color: var(--navy); margin-bottom: 22px; }
.cta-banner {
  padding: 72px 0; text-align: center; color: var(--white); position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--blue) 0%, var(--navy-mid) 100%);
}
.cta-banner h2 { font-family: var(--font-display); font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 800; margin-bottom: 14px; }
.cta-banner p { font-size: 1.03rem; color: rgba(255,255,255,0.75); margin: 0 auto 28px; max-width: 620px; line-height: 1.6; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ─── FOOTER (same as the homepage) ─── */
.footer { background: var(--navy); color: rgba(255,255,255,0.5); padding: 60px 0 32px; }
.footer-inner { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 40px; }
.footer-brand .nav-brand { margin-bottom: 20px; }
.footer-brand .nav-logo { width: 100px; height: 100px; top: 0; }
.footer-brand .nav-wordmark { color: var(--white); font-size: 1.5rem; margin-left: 0; }
.footer-brand p { font-size: 0.88rem; line-height: 1.6; max-width: 280px; }
.footer-col h4 {
  font-family: var(--font-display); font-size: 0.85rem; font-weight: 700; color: rgba(255,255,255,0.8);
  margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.08em;
}
.footer-col a { display: block; font-size: 0.88rem; color: rgba(255,255,255,0.45); text-decoration: none; padding: 5px 0; transition: color 0.2s; }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08); padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center; font-size: 0.82rem;
}
.footer-bottom a { color: rgba(255,255,255,0.4); text-decoration: none; }
.footer-bottom a:hover { color: var(--white); }

/* ─── RESPONSIVE ─── */
@media (max-width: 960px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 700px) {
  .nav-links { display: none; }
  .nav-hamburger { display: block; }
  .nav-logo { width: 120px; height: 120px; top: 18px; }
  .nav-wordmark { font-size: 1.6rem; margin-left: -18px; }
  .page-head { padding: 120px 0 48px; }
  .cards, .cards.two { grid-template-columns: 1fr; }
  .tool-cta { grid-template-columns: 1fr; padding: 24px 20px; }
  .tool-cta img { width: 64px; height: 64px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .compare thead { display: none; }
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: 100%; }
  .compare tr { border-bottom: 1px solid var(--surface-dim); padding: 6px 0; }
  .compare tbody th { width: auto; background: var(--surface); border-bottom: none; }
  .compare td { border-bottom: none; padding-top: 8px; }
  .compare td::before { content: attr(data-label); display: block; font-family: var(--font-display); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .btn-primary { transition: none; }
}
