/* FreelancerTax shared stylesheet — the ONE source of brand truth.
   Tokens: LIGHT theme — bg #f7f9fc · surface #fff · navy #0f3360 (= product navy) · gold #f5c542.
   Blog posts link this file INSTEAD of carrying their own <style> block.
   Covers semantic tags + the union of classes used across all posts. */

:root {
  /* LIGHT financial-trust palette (2026-07-05, Louie's call) — navy anchors the
     brand and MATCHES the product workbooks' navy 0F3360; gold stays for fills. */
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --navy: #0f3360;
  --accent: #0f3360;
  --heading: #0f172a;
  --gold: #f5c542;
  --gold-dim: rgba(200, 155, 30, 0.4);
  --text: #1e293b;
  --text-dim: #475569;
  --text-faint: #64748b;
  --muted: #8b96a5;
  --green: #15803d;
  --red: #b91c1c;
  --line: rgba(15, 33, 66, 0.32);
  --line-strong: rgba(15, 51, 96, 0.38);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.7; min-height: 100vh;
}

/* ---------- nav / breadcrumb ---------- */
nav, .nav { display: flex; justify-content: space-between; align-items: center; padding: 1.25rem 2rem; border-bottom: 1px solid var(--line); max-width: 1000px; margin: 0 auto; background: transparent; }
.logo { font-size: 1.2rem; font-weight: 800; color: var(--accent); text-decoration: none; }
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a, .nav-link { color: var(--text-dim); text-decoration: none; font-size: 0.9rem; }
.nav-links a:hover, .nav-link:hover { color: var(--accent); }
.breadcrumb { max-width: 760px; margin: 1.25rem auto 0; padding: 0 1.5rem; font-size: 0.8rem; color: var(--muted); }
.breadcrumb a { color: var(--text-faint); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }

/* ---------- article layout ---------- */
.container, .content, main, article { max-width: 760px; margin: 0 auto; padding: 0 1.5rem; }
article, .content { padding-bottom: 3rem; }
.hero { text-align: center; padding: 2.5rem 1.5rem 1rem; max-width: 780px; margin: 0 auto; }
h1 { font-size: 2rem; font-weight: 800; color: var(--heading); line-height: 1.25; margin: 1.6rem 0 0.9rem; }
h2 { font-size: 1.45rem; font-weight: 700; color: var(--heading); margin: 2.1rem 0 0.8rem; }
h3 { font-size: 1.12rem; font-weight: 700; color: var(--heading); margin: 1.5rem 0 0.6rem; }
p { color: var(--text-dim); margin: 0 0 1rem; }
article p, .content p { font-size: 0.98rem; }
li { color: var(--text-dim); margin-bottom: 0.45rem; }
ul, ol { padding-left: 1.4rem; margin: 0.4rem 0 1.2rem; }
strong { color: var(--heading); }
em { color: var(--text-dim); }
a { color: var(--accent); text-decoration-color: var(--gold-dim); }
a:hover { opacity: 0.85; }
hr { border: none; border-top: 1px solid var(--line); margin: 2rem 0; }
blockquote { border-left: 3px solid var(--gold); padding: 0.4rem 0 0.4rem 1.1rem; margin: 1.2rem 0; color: var(--text-dim); font-style: italic; }
img { max-width: 100%; border-radius: 10px; }
code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 0.1rem 0.4rem; font-size: 0.88em; color: var(--accent); }
.lead { font-size: 1.08rem; color: var(--text-dim); }
.subtitle { color: var(--text-dim); font-size: 1.05rem; }
.meta, .post-meta { color: var(--muted); font-size: 0.82rem; margin-bottom: 1.2rem; }
.label { color: var(--text-dim); font-weight: 600; font-size: 0.85rem; }

/* ---------- tables ---------- */
table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; font-size: 0.92rem; background: var(--surface); border-radius: 10px; overflow: hidden; }
th { text-align: left; padding: 0.7rem 0.8rem; color: var(--accent); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid var(--line); background: var(--surface-2); }
td { padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--line); color: var(--text); }
tr:last-child td { border-bottom: none; }
.calc-table td:last-child, td.amount { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- boxes / callouts ---------- */
.callout, .highlight-box, .tip-box, .tip, .info, .step-box, .example-box, .toc, .box {
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--gold);
  border-radius: 10px; padding: 1rem 1.2rem; margin: 1.3rem 0;
}
.callout p, .highlight-box p, .tip-box p, .info p, .step-box p, .example-box p { margin-bottom: 0.4rem; }
.warning-box, .warning, .danger, .red-flag {
  background: rgba(239, 68, 68, 0.07); border: 1px solid rgba(239, 68, 68, 0.25); border-left: 3px solid var(--red);
  border-radius: 10px; padding: 1rem 1.2rem; margin: 1.3rem 0; color: var(--text-dim);
}
.success, .savings {
  background: rgba(34, 197, 94, 0.07); border: 1px solid rgba(34, 197, 94, 0.25); border-left: 3px solid var(--green);
  border-radius: 10px; padding: 1rem 1.2rem; margin: 1.3rem 0; color: var(--text-dim);
}
.highlight { background: rgba(245, 197, 66, 0.25); color: var(--heading); padding: 0.08rem 0.35rem; border-radius: 4px; }
.cra-source { font-size: 0.8rem; color: var(--muted); border-top: 1px dashed var(--line); margin-top: 0.7rem; padding-top: 0.5rem; }
.toc ul { margin-bottom: 0; }
.toc a { text-decoration: none; }

/* step lists */
.step-number, .step-num { display: inline-flex; align-items: center; justify-content: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--gold); color: #1f2937; font-weight: 800; font-size: 0.9rem; margin-right: 0.6rem; flex-shrink: 0; }
.step { margin: 1rem 0; }

/* deduction / t2125 tag styles used in list posts */
.deduction { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 0.9rem 1.1rem; margin: 0.8rem 0; }
.t2125 { display: inline-block; background: var(--surface-2); color: var(--accent); font-size: 0.72rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 999px; margin-left: 0.4rem; }
.star, .rating { color: #ca8a04; }
.price { color: var(--green); font-weight: 800; }
.rate, .result, .total { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--heading); }
.empty { color: var(--muted); }

/* pros/cons + product cards in roundup posts */
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.2rem 0; }
.pros, .cons { background: var(--surface); border-radius: 10px; padding: 1rem 1.2rem; border: 1px solid var(--line); }
.pros { border-left: 3px solid var(--green); }
.cons { border-left: 3px solid var(--red); }
.software-card, .post-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1.3rem; margin: 1rem 0; }
.post-card a { text-decoration: none; }
.post-card h2, .post-card h3 { margin-top: 0; }
.post-tag { display: inline-block; background: rgba(15, 51, 96, 0.08); color: var(--accent); font-size: 0.72rem; font-weight: 700; padding: 0.15rem 0.55rem; border-radius: 999px; margin: 0 0.3rem 0.4rem 0; }

/* FAQ */
.faq-answer { color: var(--text-dim); }
details { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 0.9rem 1.1rem; margin-bottom: 0.6rem; }
summary { cursor: pointer; color: var(--heading); font-weight: 600; }

/* ---------- CTA ---------- */
.cta-box, .cta { background: rgba(245, 197, 66, 0.08); border: 1px solid rgba(245, 197, 66, 0.2); border-radius: 12px; padding: 1.5rem; text-align: center; margin: 2rem 0; }
.cta-box p, .cta p { color: var(--text-dim); font-size: 0.95rem; margin-bottom: 0.75rem; }
.cta-box a, .cta a, .cta-btn, .btn {
  display: inline-block; background: var(--gold); color: #1f2937 !important; font-weight: 700;
  padding: 0.7rem 1.7rem; border-radius: 8px; text-decoration: none; border: none; cursor: pointer; font-size: 0.95rem; margin: 0.2rem;
}
.cta-box a:hover, .cta a:hover, .cta-btn:hover, .btn:hover { background: #e5b532; opacity: 1; }
.btn-outline { background: transparent; border: 1px solid var(--gold-dim); color: var(--accent) !important; }
.btn-outline:hover { background: rgba(245, 197, 66, 0.1); }

/* ---------- footer ---------- */
footer, .footer { text-align: center; padding: 2rem; font-size: 0.75rem; color: var(--muted); border-top: 1px solid var(--line); max-width: 1000px; margin: 2.5rem auto 0; background: transparent; }
footer a, .footer a { color: var(--text-faint); text-decoration: none; }
footer p, .footer p { color: var(--muted); margin-bottom: 0.3rem; }

/* ---------- long-tail classes from individual posts ---------- */
.verdict, .total-box { background: rgba(34, 197, 94, 0.07); border: 1px solid rgba(34, 197, 94, 0.25); border-radius: 10px; padding: 1rem 1.2rem; margin: 1.3rem 0; }
.badge, .pick { display: inline-block; background: rgba(15, 51, 96, 0.08); color: var(--accent); font-size: 0.75rem; font-weight: 700; padding: 0.2rem 0.6rem; border-radius: 999px; }
.header, .page-header { text-align: center; padding: 2rem 1.5rem 0.5rem; max-width: 780px; margin: 0 auto; }
.faq { margin: 1rem 0; }
.faq h3 { margin-top: 1.3rem; }
.deduction-list li, .checklist li { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 0.6rem 0.9rem; margin: 0.45rem 0; list-style: none; }
.deduction-list, .checklist { padding-left: 0; }
.calc-box { background: var(--surface); border: 1px solid var(--gold-dim); border-radius: 10px; padding: 1rem 1.2rem; margin: 1.3rem 0; }
.stats-grid, .comparison-grid, .vs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin: 1.3rem 0; }
.stat, .comparison-card, .vs-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem; text-align: center; }
.stat .number, .number { font-size: 1.7rem; font-weight: 800; color: var(--accent); }
.vs-card.corp { border-left: 3px solid var(--gold); }
.vs-card.sole { border-left: 3px solid var(--green); }
.back-link { display: inline-block; margin: 1rem 0 0; color: var(--text-faint); font-size: 0.85rem; text-decoration: none; }
.folder-tree { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.2rem; font-family: ui-monospace, monospace; font-size: 0.85rem; color: var(--text-dim); white-space: pre-wrap; }
.comparison-table td:first-child { font-weight: 600; color: var(--heading); }
.deadline-table .urgent, .urgent { color: var(--red); font-weight: 700; }
.source-link { font-size: 0.8rem; color: var(--muted); }
.posts { max-width: 780px; margin: 0 auto; padding: 0 1.5rem 3rem; }
.article { max-width: 760px; margin: 0 auto; padding: 0 1.5rem 3rem; }

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  nav, .nav { padding: 1rem 1.25rem; }
  .pros-cons { grid-template-columns: 1fr; }
  table { display: block; overflow-x: auto; }
}

/* ===== .bg-scene v3 — modern fintech ambient (Louie 2026-07-05 v2; dot matrix REMOVED
   2026-07-16 per Louie in chat: "looks like dirt on my device")
   Layers: 3-tone mesh gradient (navy/sky/gold, slow drift) + faint grain.
   Markup: <div class="bg-scene" aria-hidden="true" style="position:fixed;
   inset:0;z-index:-1;overflow:hidden;pointer-events:none;"><div class="bg-blob bg-blob-a">
   </div><div class="bg-blob bg-blob-b"></div><div class="bg-blob bg-blob-c"></div></div> */
.bg-scene { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-scene::after { content: ""; position: absolute; inset: 0; opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E"); }
.bg-blob { position: absolute; border-radius: 50%; filter: blur(110px); will-change: transform; }
.bg-blob-a { width: 60vw; height: 60vw; max-width: 860px; max-height: 860px; left: -15vw; top: -20vh;
  background: radial-gradient(circle, rgba(15,51,96,0.09), rgba(15,51,96,0) 62%);
  animation: bgDriftA 44s ease-in-out infinite alternate; }
.bg-blob-b { width: 50vw; height: 50vw; max-width: 720px; max-height: 720px; right: -16vw; top: 4vh;
  background: radial-gradient(circle, rgba(245,197,66,0.10), rgba(245,197,66,0) 62%);
  animation: bgDriftB 52s ease-in-out infinite alternate; }
.bg-blob-c { width: 46vw; height: 46vw; max-width: 640px; max-height: 640px; left: 28vw; bottom: -24vh;
  background: radial-gradient(circle, rgba(56,132,255,0.07), rgba(56,132,255,0) 62%);
  animation: bgDriftA 60s ease-in-out infinite alternate-reverse; }
@keyframes bgDriftA { from { transform: translate(0,0) scale(1); } to { transform: translate(6vw, 7vh) scale(1.07); } }
@keyframes bgDriftB { from { transform: translate(0,0) scale(1.05); } to { transform: translate(-5vw, -6vh) scale(1); } }
/* dot matrix (.bg-grid) deleted 2026-07-16 (Louie: dots read as dirt); .bg-leaf gone with v1 */
.bg-leaf { display: none; }
@media (prefers-reduced-motion: reduce) { .bg-blob { animation: none; } }

/* ===== contrast pass (Louie 2026-07-05: borders/headers/CTAs too subtle) ===== */
h2 { position: relative; padding-bottom: 0.45rem; }
h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 44px; height: 3px;
  border-radius: 2px; background: linear-gradient(90deg, var(--gold), rgba(245,197,66,0.25)); }
.hero h2::after, .stats-band h2::after, .email-capture h2::after { left: 50%; transform: translateX(-50%); }
.cta-box, .cta { background: rgba(245, 197, 66, 0.16) !important; border: 1.5px solid rgba(200, 155, 30, 0.55) !important;
  box-shadow: 0 6px 24px rgba(15, 51, 96, 0.07); }
.callout, .highlight-box, .tip-box, .tip, .info, .step-box, .example-box, .toc, .box,
.deduction, .software-card, .post-card, .calc-box, .stat, .comparison-card, .vs-card,
.pros, .cons, details, .deduction-list li, .checklist li, .calc-card, .intent-card, .feature-card {
  border-color: var(--line) !important;
  box-shadow: 0 3px 14px rgba(15, 51, 96, 0.08);
}
table { border: 1px solid var(--line); }
nav { border-bottom: 1px solid var(--line-strong); }
