/* ── GST invoice generator (shared, scoped) ─────────────────────────────── */
.tool-hero { padding: 56px 0 24px; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.tool-hero .eyebrow { color: var(--blue); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.tool-hero h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin: 10px 0 12px; }
.tool-hero p { color: var(--muted); max-width: 660px; font-size: 1.05rem; }

.region-switch { display: inline-flex; gap: 4px; margin-top: 18px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.region-switch a { padding: 6px 16px; border-radius: 999px; font-weight: 600; font-size: .9rem; color: var(--muted); }
.region-switch a.active { background: var(--blue); color: #fff; }

.gen-wrap { padding: 36px 0 8px; }
.gen-grid { display: grid; grid-template-columns: 380px 1fr; gap: 28px; align-items: start; }
@media (max-width: 900px) { .gen-grid { grid-template-columns: 1fr; } }

/* ── Form ─────────────────────────────────────────────────────────────── */
.gen-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.gen-form h2 { font-size: 1.05rem; margin: 0 0 2px; }
.gen-form .gen-sub { color: var(--muted); font-size: .85rem; margin-bottom: 16px; }
.gen-section { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 18px 0 8px; }
.gen-field { margin-bottom: 10px; }
.gen-field label { display: block; font-weight: 600; font-size: .82rem; margin-bottom: 4px; color: var(--ink); }
.gen-field input, .gen-field textarea { width: 100%; font: inherit; font-size: .92rem; padding: 9px 11px; border: 1px solid #cbd5e1; border-radius: var(--radius-sm); background: #fff; color: var(--ink); }
.gen-field textarea { resize: vertical; min-height: 60px; }
.gen-field input:focus, .gen-field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29,78,216,.12); }
.gen-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* line items */
.gen-item { display: grid; grid-template-columns: 1fr 56px 84px 28px; gap: 6px; align-items: center; margin-bottom: 6px; }
.gen-item input { padding: 8px 9px; font-size: .88rem; min-width: 0; }
.gen-item .gen-remove { border: none; background: var(--bg-alt); color: var(--muted); border-radius: 8px; height: 34px; cursor: pointer; font-size: 1.1rem; line-height: 1; }
.gen-item .gen-remove:hover { background: #fee2e2; color: #b91c1c; }
.gen-item-head { display: grid; grid-template-columns: 1fr 56px 84px 28px; gap: 6px; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 4px; }
.gen-add { margin-top: 6px; background: transparent; border: 1px dashed #cbd5e1; color: var(--blue); font-weight: 600; padding: 9px; width: 100%; border-radius: var(--radius-sm); cursor: pointer; font-size: .88rem; }
.gen-add:hover { border-color: var(--blue); background: #f5f8ff; }

.gen-actions { margin-top: 18px; display: flex; gap: 10px; }

/* ── Invoice preview (the printable doc) ───────────────────────────────── */
.gen-preview { position: sticky; top: 88px; }
.invoice-doc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; }
.inv-head { background: var(--navy); color: #fff; padding: 26px 30px; display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.inv-biz-name { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.01em; }
.inv-biz-meta { color: #94a3b8; font-size: .8rem; margin-top: 3px; line-height: 1.5; white-space: pre-line; }
.inv-title { font-size: 1.5rem; font-weight: 900; letter-spacing: 3px; font-family: monospace; text-align: right; }
.inv-meta { display: flex; gap: 26px; padding: 16px 30px; background: var(--bg-soft); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.inv-meta div .k { font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.inv-meta div .v { font-size: .9rem; font-weight: 600; color: var(--ink); }
.inv-billto { padding: 18px 30px 6px; }
.inv-billto .k { font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 3px; }
.inv-billto .v { font-size: 1rem; font-weight: 700; color: var(--navy); }
.inv-table { width: 100%; border-collapse: collapse; padding: 0 30px; }
.inv-table-wrap { padding: 12px 30px 0; }
.inv-table th { text-align: left; font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-bottom: 2px solid var(--line); padding: 8px 0; }
.inv-table td { padding: 9px 0; font-size: .86rem; color: var(--ink); border-bottom: 1px solid var(--bg-alt); vertical-align: top; }
.inv-table .num { text-align: right; white-space: nowrap; }
.inv-totals { padding: 12px 30px 6px; display: flex; justify-content: flex-end; }
.inv-totals table { min-width: 240px; }
.inv-totals td { padding: 4px 0; font-size: .88rem; color: var(--muted); }
.inv-totals td.num { text-align: right; color: var(--ink); font-weight: 600; }
.inv-totals tr.total td { border-top: 2px solid var(--line); padding-top: 8px; font-size: 1.05rem; font-weight: 800; color: var(--navy); }
.inv-totals tr.total td.num { color: var(--blue); }
.inv-notes { padding: 10px 30px 26px; }
.inv-notes .k { font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 3px; }
.inv-notes .v { font-size: .82rem; color: var(--muted); line-height: 1.6; white-space: pre-line; }

/* ── SEO body ──────────────────────────────────────────────────────────── */
.tool-body { padding: 20px 0 8px; }
.tool-body .prose { max-width: 760px; }
.tool-body .prose h2 { font-size: 1.5rem; margin: 34px 0 10px; }
.tool-body .prose h3 { font-size: 1.1rem; margin: 22px 0 6px; }
.tool-body .prose p, .tool-body .prose li { color: var(--ink); line-height: 1.7; }
.tool-body .prose ul { margin: 8px 0 8px 20px; }
.tool-body .prose .muted { color: var(--muted); }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 24px; margin-bottom: 12px; max-width: 760px; }
.faq-item h3 { font-size: 1.05rem; margin-bottom: 6px; }
.faq-item p { color: var(--muted); line-height: 1.7; padding: 0; margin: 0; }
.tool-cta { margin: 40px 0 8px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; text-align: center; }
.tool-cta h2 { font-size: 1.5rem; margin-bottom: 8px; }
.tool-cta p { color: var(--muted); max-width: 560px; margin: 0 auto 18px; }
.disclaimer { color: var(--muted); font-size: .82rem; max-width: 760px; margin: 26px 0 0; }

/* ── Print: show only the invoice document ─────────────────────────────── */
@media print {
  /* Zero page margin suppresses the browser's URL/title/date header & footer;
     we add our own breathing room via .gen-preview padding below. */
  @page { margin: 0; }
  /* Print background colours so the navy header band and accents come through. */
  body { background: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .site-header, .tool-hero, .gen-form, .tool-body, .site-footer, .gen-actions { display: none !important; }
  .gen-wrap { padding: 0; }
  .gen-grid { display: block; }
  .gen-preview { position: static; padding: 12mm 10mm; }
  .invoice-doc { border: none; box-shadow: none; border-radius: 12px; overflow: hidden; }
  .container { max-width: none; padding: 0; }
}
