body { background: linear-gradient(180deg, #f0f4fa 0%, #f8fafc 120px); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.prose p { color: #475569; line-height: 1.8; margin-bottom: 1rem; }
.prose h2 { font-size: 1.5rem; font-weight: 800; color: #0f172a; margin-top: 2rem; margin-bottom: 1rem; }
.prose h3 { font-size: 1.25rem; font-weight: 700; color: #0f172a; margin-top: 1.5rem; margin-bottom: 0.75rem; }
.blog-content a { color: #002d72; font-weight: 600; text-decoration: underline; }
.blog-content h2 { margin: 1.75rem 0 0.75rem; font-size: 1.25rem; font-weight: 800; color: #0f172a; line-height: 1.35; }
.blog-content img { max-width: 100%; height: auto; border-radius: 0.5rem; margin: 1rem 0; }
.blog-content ul, .blog-content ol { margin: 0.75rem 0 1rem; padding-left: 1.5rem; color: #475569; }
.blog-content ul { list-style: disc; }
.blog-content ol { list-style: decimal; }
.blog-content li { margin-bottom: 0.35rem; }
.blog-content-table-wrap { margin: 1.25rem 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.blog-content .blog-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  line-height: 1.45;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  overflow: hidden;
}
.blog-content .blog-data-table th,
.blog-content .blog-data-table td {
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
}
.blog-content .blog-data-table th {
  background: #f8fafc;
  font-weight: 700;
  color: #0f172a;
}
.blog-content .blog-data-table tr:last-child td { border-bottom: 0; }
.blog-content .blog-data-table tbody tr:nth-child(even) td { background: #fcfdfe; }
.blog-source-attribution,
.blog-content .blog-source-attribution {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #f8fafc;
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.6;
}
.blog-source-attribution p { margin: 0 0 0.5rem; }
.blog-source-attribution p:last-child { margin-bottom: 0; }
.blog-source-attribution a { color: #002d72; font-weight: 600; text-decoration: underline; }
.blog-source-copyright { color: #94a3b8; }
.blog-load-more-wrap.is-loading .blog-load-more-btn { opacity: 0.65; cursor: wait; }
.blog-load-sentinel { pointer-events: none; }
.blog-posts-feed .blog-post-card { animation: blog-card-in 0.35s ease both; }
@keyframes blog-card-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.blog-pill { display: inline-flex; align-items: center; border-radius: 9999px; padding: 0.25rem 0.75rem; font-size: 0.75rem; font-weight: 600; text-decoration: none; }
.blog-pill-category { background: #eef4fb; color: #002d72; }
.blog-pill-category:hover { background: #d5e4f5; }
.blog-pill-tag { background: #f1f5f9; color: #475569; }
.blog-pill-tag:hover { background: #e2e8f0; color: #0f172a; }
.blog-sidebar-link { display: block; border-radius: 0.5rem; padding: 0.5rem 0.75rem; font-size: 0.875rem; font-weight: 600; color: #334155; }
.blog-sidebar-link:hover { background: #f8fafc; color: #002d72; }
.blog-sidebar-link-active { background: #eef4fb; color: #002d72; }
.blog-post-card { display: flex; flex-direction: column; gap: 1rem; border-radius: 1rem; border: 1px solid #e2e8f0; background: #fff; padding: 1.25rem; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04); transition: box-shadow 0.2s ease, border-color 0.2s ease; }
.blog-post-card:hover { border-color: #a8c9eb; box-shadow: 0 8px 24px rgba(0, 45, 114, 0.08); }
@media (min-width: 640px) {
  .blog-post-card--has-thumb { flex-direction: row; align-items: stretch; }
}
.blog-post-card-thumb { display: block; flex-shrink: 0; overflow: hidden; border-radius: 0.75rem; background: #f1f5f9; }
@media (min-width: 640px) {
  .blog-post-card-thumb { width: 11rem; }
}
.blog-post-card-thumb img { width: 100%; height: 100%; min-height: 7rem; object-fit: cover; aspect-ratio: 3 / 2; transition: transform 0.25s ease; }
.blog-post-card:hover .blog-post-card-thumb img { transform: scale(1.03); }
.blog-post-card-body { flex: 1; min-width: 0; }
.home-news-grid { display: grid; gap: 1.25rem; }
@media (min-width: 640px) {
  .home-news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .home-news-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.home-news-card {
  display: flex;
  flex-direction: column;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 3px rgb(15 23 42 / 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.home-news-card:hover { border-color: #a8c9eb; box-shadow: 0 8px 24px rgb(0 45 114 / 0.08); }
.home-news-card-thumb { display: block; overflow: hidden; background: #f1f5f9; }
.home-news-card-thumb img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 0.25s ease; }
.home-news-card:hover .home-news-card-thumb img { transform: scale(1.03); }
.home-news-card-body { display: flex; flex-direction: column; flex: 1; padding: 1.25rem; }
.home-news-category {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 0.5rem;
  border-radius: 9999px;
  background: #eef4fb;
  padding: 0.2rem 0.65rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #002d72;
  text-decoration: none;
}
.home-news-category:hover { background: #d5e4f5; }
.home-news-card-title { margin-top: 0.625rem; font-size: 1.0625rem; font-weight: 800; line-height: 1.35; color: #0f172a; }
.home-news-card-title a { color: inherit; text-decoration: none; }
.home-news-card-title a:hover { color: #002d72; }
.home-news-card-excerpt {
  margin-top: 0.5rem;
  flex: 1;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #64748b;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-news-keywords { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.home-news-keyword { font-size: 0.75rem; font-weight: 700; color: #002d72; background: #fff; border: 1px solid #d5e4f5; border-radius: 9999px; padding: 0.35rem 0.75rem; }
.home-news-grid--home { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .home-news-grid--home { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.home-news-card-link { margin-top: 0.875rem; font-size: 0.875rem; font-weight: 700; color: #002d72; text-decoration: none; }
.home-news-card-link:hover { text-decoration: underline; }
.blog-feature-image { overflow: hidden; border-radius: 1rem; border: 1px solid #e2e8f0; background: #f8fafc; }
.blog-feature-image img { display: block; width: 100%; height: auto; max-height: 28rem; object-fit: cover; }
.blog-aside-posts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.875rem; }
.blog-aside-post { display: flex; gap: 0.75rem; align-items: flex-start; }
.blog-aside-post-thumb { display: block; flex-shrink: 0; width: 4rem; height: 3rem; overflow: hidden; border-radius: 0.5rem; background: #f1f5f9; }
.blog-aside-post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.blog-aside-post-body { min-width: 0; flex: 1; }
.blog-aside-post-date { font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: #94a3b8; }
.blog-aside-post-title { display: block; margin-top: 0.125rem; font-size: 0.875rem; font-weight: 700; line-height: 1.35; color: #0f172a; text-decoration: none; }
.blog-aside-post-title:hover { color: #002d72; text-decoration: underline; }
.blog-detail-aside { order: 2; }
@media (min-width: 1024px) {
  .blog-detail-aside { order: 0; }
}
.prose ul { list-style: disc; padding-left: 1.25rem; color: #475569; }
.calculator-card { border-radius: 1rem; border: 1px solid #e2e8f0; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / 0.04); overflow: hidden; }
.calculator-card-header { border-bottom: 1px solid #f1f5f9; background: #f8fafc; padding: 1rem 1.25rem; }
.field-input { width: 100%; border-radius: 0.75rem; border: 1px solid #e2e8f0; padding: 0.625rem 0.875rem; font-size: 0.875rem; }
.tax-range { accent-color: #002d72; }
.cookie-consent { position: fixed; bottom: 0; left: 0; right: 0; z-index: 100; padding: 1rem; background: rgba(15,23,42,0.95); color: #e2e8f0; }
.cookie-consent-inner { max-width: 72rem; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.cookie-consent-title { font-weight: 700; font-size: 0.875rem; }
.cookie-consent-text { font-size: 0.8125rem; color: #94a3b8; margin-top: 0.25rem; }
.cookie-consent-link { color: #fdba74; text-decoration: underline; }
.cookie-consent-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
.cookie-btn { border-radius: 0.5rem; padding: 0.5rem 1rem; font-size: 0.8125rem; font-weight: 600; cursor: pointer; border: none; }
.cookie-btn-secondary { background: #334155; color: #e2e8f0; }
.cookie-btn-primary { background: #ea5406; color: #fff; }
.cookie-btn-ghost { background: transparent; color: #cbd5e1; border: 1px solid #475569; }
.cookie-consent-preferences { margin-top: 0.75rem; display: flex; flex-direction: column; gap: 0.5rem; }
.cookie-pref-row { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.8125rem; color: #cbd5e1; cursor: pointer; }
.cookie-pref-row input { margin-top: 0.15rem; accent-color: #ea5406; }
body.cookie-banner-open { padding-bottom: 5.5rem; }
body.pdf-editing footer { display: none; }
body.pdf-editing #pdf-page-intro,
body.pdf-editing #pdf-seo-content { display: none; }
body.pdf-editing { height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
body.pdf-editing header { flex-shrink: 0; position: relative; z-index: 50; }
body.pdf-editing #main-content { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
body.pdf-editing #pdf-editor-app { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* PDF page intro (SEO hero, visible before upload) */
.pdf-page-intro { border-bottom: 1px solid #e2e8f0; background: linear-gradient(180deg, #fff 0%, #f8fafc 100%); }
.pdf-page-intro-inner { max-width: 72rem; margin: 0 auto; padding: 1.25rem 1rem 1rem; }
@media (min-width: 640px) { .pdf-page-intro-inner { padding: 1.5rem 1.5rem 1.25rem; } }
.pdf-breadcrumb { font-size: 0.75rem; color: #64748b; margin-bottom: 0.5rem; }
.pdf-breadcrumb a { color: #002d72; font-weight: 600; }
.pdf-breadcrumb a:hover { text-decoration: underline; }
.pdf-page-intro h1 { font-size: 1.375rem; font-weight: 800; color: #0f172a; line-height: 1.25; }
@media (min-width: 640px) { .pdf-page-intro h1 { font-size: 1.75rem; } }
.pdf-page-intro-lead { margin-top: 0.5rem; max-width: 42rem; font-size: 0.875rem; line-height: 1.6; color: #475569; }
.pdf-use-pills { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-top: 0.75rem; }
.pdf-use-pill { font-size: 0.6875rem; font-weight: 600; color: #002d72; background: #eef4fb; border: 1px solid #d5e4f5; border-radius: 9999px; padding: 0.2rem 0.625rem; }

/* PDF Editor workspace — flex below header, no overlap */
.pdf-editor-layout { flex: 1; min-height: 0; display: flex; background: #e2e8f0; }
.pdf-panels {
  flex-shrink: 0;
  display: flex;
  min-height: 0;
  height: 100%;
  z-index: 10;
}
.pdf-sidebar {
  width: 248px; flex-shrink: 0; display: flex; flex-direction: column;
  background: #fff; border-right: 1px solid #e2e8f0;
  box-shadow: 1px 0 0 rgb(0 0 0 / 0.04);
}
.pdf-options-panel {
  width: 280px; flex-shrink: 0; display: flex; flex-direction: column;
  background: #f8fafc; border-right: 1px solid #cbd5e1;
  box-shadow: 1px 0 0 rgb(0 0 0 / 0.03);
}
.pdf-options-header {
  flex-shrink: 0; display: flex; align-items: flex-start; gap: 0.625rem;
  padding: 0.875rem 1rem; border-bottom: 1px solid #e2e8f0; background: #fff;
}
.pdf-options-icon {
  display: flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem; flex-shrink: 0; border-radius: 0.625rem;
  background: #eef4fb; color: #002d72;
}
.pdf-options-icon svg { width: 1.125rem; height: 1.125rem; }
.pdf-options-title { font-size: 0.875rem; font-weight: 700; color: #0f172a; line-height: 1.2; }
.pdf-options-hint { margin-top: 0.125rem; font-size: 0.6875rem; line-height: 1.35; color: #64748b; }
.pdf-options-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 0.875rem 1rem; }
.pdf-options-panel--empty .pdf-options-scroll { display: flex; align-items: flex-start; }
.pdf-sidebar-header { flex-shrink: 0; display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1rem; border-bottom: 1px solid #e2e8f0; background: #fafbfc; }
.pdf-sidebar-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; }
.pdf-sidebar-section { padding: 0.75rem 1rem; border-bottom: 1px solid #f1f5f9; }
.pdf-sidebar-label { font-size: 0.625rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: #94a3b8; margin-bottom: 0.5rem; }
.pdf-sidebar-actions { display: flex; gap: 0.5rem; }
.pdf-sidebar-footer { flex-shrink: 0; padding: 0.75rem 1rem; border-top: 1px solid #e2e8f0; background: #fafbfc; }
.pdf-sidebar-actions-bar {
  flex-shrink: 0; display: flex; gap: 0.375rem; padding: 0.5rem 0.625rem;
  border-bottom: 1px solid #f1f5f9; background: #fafbfc;
}
.pdf-sidebar-actions-bar .pdf-btn-primary,
.pdf-sidebar-actions-bar .pdf-btn-secondary { flex: 1; padding: 0.375rem 0.5rem; font-size: 0.6875rem; }
.pdf-sidebar-actions-bar .pdf-btn-primary span,
.pdf-sidebar-actions-bar .pdf-btn-secondary span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdf-sidebar-body { flex: 1; min-height: 0; display: flex; overflow: hidden; }
.pdf-tool-rail {
  width: 52px; flex-shrink: 0; overflow-y: auto; overflow-x: hidden;
  padding: 0.375rem 0.25rem; border-right: 1px solid #f1f5f9; background: #fafbfc;
}
.pdf-tool-rail-group { margin-bottom: 0.625rem; }
.pdf-tool-rail-group:last-child { margin-bottom: 0; }
.pdf-tool-rail-label {
  display: none;
}
.pdf-tool-icon-btn {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; margin: 0 auto 0.125rem; padding: 0;
  border-radius: 0.5rem; border: 1px solid transparent; background: transparent;
  cursor: pointer; color: #334155; transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.pdf-tool-icon-btn:hover { background: #f1f5f9; border-color: #e2e8f0; }
.pdf-tool-icon-btn:active { transform: scale(0.96); }
.pdf-tool-icon-btn.active {
  background: #002d72; border-color: #00255e; color: #fff;
  box-shadow: 0 2px 8px rgb(0 45 114 / 0.2);
}
.pdf-tool-icon-btn .pdf-tool-icon {
  display: flex; align-items: center; justify-content: center;
  width: 1.75rem; height: 1.75rem; background: transparent;
}
.pdf-tool-icon-btn .pdf-tool-icon svg { width: 1.125rem; height: 1.125rem; }
.pdf-tool-icon-btn.active .pdf-tool-icon { color: #fff; }
.pdf-tool-info-panel {
  flex-shrink: 0; min-height: 3.5rem; padding: 0.5rem 0.625rem;
  border-bottom: 1px solid #f1f5f9; background: #f8fafc;
  transition: background 0.15s, border-color 0.15s;
}
.pdf-tool-info-panel.is-hover { background: #eef4fb; border-bottom-color: #dbeafe; }
.pdf-tool-info-title { font-size: 0.75rem; font-weight: 700; color: #0f172a; line-height: 1.25; }
.pdf-tool-info-hint { margin-top: 0.125rem; font-size: 0.6875rem; line-height: 1.35; color: #64748b; }
.pdf-page-strip-col {
  flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column;
  background: #fff;
}
.pdf-page-strip-label {
  flex-shrink: 0; padding: 0.5rem 0.625rem 0.25rem;
  font-size: 0.625rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: #94a3b8;
}
.pdf-page-strip {
  flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden;
  padding: 0.25rem 0.5rem 0.375rem; display: flex; flex-direction: column; gap: 0.5rem;
}
.pdf-page-thumb {
  position: relative; flex-shrink: 0; border-radius: 0.5rem;
  border: 2px solid #e2e8f0; background: #f8fafc; transition: border-color 0.15s, box-shadow 0.15s;
}
.pdf-page-thumb:hover { border-color: #cbd5e1; }
.pdf-page-thumb.active { border-color: #002d72; box-shadow: 0 0 0 1px #002d72; background: #eef4fb; }
.pdf-page-thumb-main {
  display: block; width: 100%; padding: 0.375rem; border: none; background: transparent; cursor: pointer;
}
.pdf-page-thumb-img {
  display: block; width: 100%; height: auto; aspect-ratio: 8.5 / 11;
  border-radius: 0.25rem; background: #e2e8f0; object-fit: contain;
}
.pdf-page-thumb-num {
  display: block; margin-top: 0.25rem; text-align: center;
  font-size: 0.625rem; font-weight: 700; color: #64748b;
}
.pdf-page-thumb.active .pdf-page-thumb-num { color: #002d72; }
.pdf-page-thumb-delete {
  position: absolute; top: 0.25rem; right: 0.25rem;
  display: flex; align-items: center; justify-content: center;
  width: 1.25rem; height: 1.25rem; padding: 0;
  border-radius: 9999px; border: 1px solid #fecaca; background: #fff; color: #dc2626;
  cursor: pointer; opacity: 0; transition: opacity 0.12s, background 0.12s;
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.12);
}
.pdf-page-thumb-delete svg { width: 0.625rem; height: 0.625rem; }
.pdf-page-thumb:hover .pdf-page-thumb-delete,
.pdf-page-thumb:focus-within .pdf-page-thumb-delete { opacity: 1; }
.pdf-page-thumb-delete:hover { background: #fef2f2; }
.pdf-page-add-btn {
  flex-shrink: 0; display: flex; align-items: center; justify-content: center; gap: 0.375rem;
  margin: 0 0.5rem 0.5rem; padding: 0.5rem; border-radius: 0.5rem;
  border: 1px dashed #cbd5e1; background: #f8fafc; color: #475569;
  font-size: 0.6875rem; font-weight: 700; cursor: pointer; transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.pdf-page-add-btn svg { width: 0.875rem; height: 0.875rem; flex-shrink: 0; }
.pdf-page-add-btn:hover { border-color: #002d72; background: #eef4fb; color: #002d72; }
.pdf-footer-row { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.375rem; }
.pdf-footer-row:last-child { margin-bottom: 0; }
.pdf-footer-label { font-size: 0.625rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #94a3b8; }
.pdf-workspace { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.pdf-canvas-controls {
  position: absolute;
  right: 1rem;
  bottom: 2.75rem;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.45rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: rgb(255 255 255 / 0.96);
  box-shadow: 0 4px 18px rgb(15 23 42 / 0.1);
  backdrop-filter: blur(8px);
}
.pdf-canvas-controls-group { display: flex; align-items: center; gap: 0.125rem; }
.pdf-canvas-controls-divider { width: 1px; height: 1.625rem; background: #e2e8f0; margin: 0 0.2rem; flex-shrink: 0; }
.pdf-canvas-controls-zoom-label {
  min-width: 2.75rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #334155;
  font-variant-numeric: tabular-nums;
  user-select: none;
}
.pdf-canvas-controls .pdf-icon-btn { width: 1.875rem; height: 1.875rem; border-radius: 0.45rem; }
.pdf-canvas-scroll { flex: 1; overflow: hidden; position: relative; background: linear-gradient(#cbd5e1 1px, transparent 1px), linear-gradient(90deg, #cbd5e1 1px, transparent 1px); background-size: 24px 24px; }
.pdf-canvas-scroll.pan-ready,
.pdf-canvas-scroll.pan-tool-active { cursor: grab; }
.pdf-canvas-scroll.pan-active { cursor: grabbing; user-select: none; }
.pdf-canvas-scroll.pan-ready .pdf-overlay-canvas,
.pdf-canvas-scroll.pan-active .pdf-overlay-canvas,
.pdf-canvas-scroll.pan-tool-active .pdf-overlay-canvas { cursor: inherit; }
.pdf-canvas-stage {
  min-width: 100%;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  box-sizing: border-box;
}
.pdf-canvas-wrap { position: relative; width: fit-content; box-shadow: 0 25px 50px -12px rgb(15 23 42 / 0.25); will-change: transform; }
.pdf-page-canvas { display: block; background: #fff; }
.pdf-inline-text-editor {
  position: absolute;
  z-index: 15;
  margin: 0;
  border: none;
  outline: 2px solid #2563eb;
  background: rgba(255, 255, 255, 0.92);
  padding: 2px 6px;
  min-width: 3rem;
  line-height: 1.2;
  box-shadow: 0 2px 8px rgb(37 99 235 / 0.12);
  pointer-events: none;
}
.pdf-inline-text-editor.editing,
.pdf-inline-text-editor:focus {
  pointer-events: auto;
  outline: 2px solid #002d72;
  background: #fff;
}
.pdf-inline-note-editor {
  outline: none;
  box-shadow: none;
  background: transparent;
  padding: 0;
  resize: none;
  overflow: hidden;
}
.pdf-inline-note-editor:focus {
  outline: none;
  background: transparent;
}
.pdf-canvas-tool-palette {
  position: absolute;
  top: 0.625rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  width: min(36rem, calc(100% - 1.5rem));
  max-height: min(42vh, 20rem);
  display: flex;
  flex-direction: column;
  border-radius: 0.75rem;
  background: rgb(255 255 255 / 0.98);
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 32px rgb(15 23 42 / 0.18);
  overflow: hidden;
}
.pdf-options-panel { display: none !important; }
.pdf-canvas-tool-palette-header {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  flex-shrink: 0;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.pdf-canvas-tool-palette-header:active { cursor: grabbing; }
.pdf-canvas-tool-palette-grip {
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1;
  color: #94a3b8;
  padding-top: 0.125rem;
}
.pdf-canvas-tool-palette-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border-radius: 0.5rem;
  background: #eef4fb;
  color: #002d72;
}
.pdf-canvas-tool-palette-icon svg { width: 1rem; height: 1rem; }
.pdf-canvas-tool-palette-title { font-size: 0.8125rem; font-weight: 700; color: #0f172a; line-height: 1.2; }
.pdf-canvas-tool-palette-hint { margin-top: 0.125rem; font-size: 0.6875rem; line-height: 1.35; color: #64748b; }
.pdf-canvas-tool-palette-controls {
  overflow-y: auto;
  padding: 0.75rem 0.875rem;
}
.pdf-color-picker { margin-bottom: 0.75rem; }
.pdf-color-picker-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 0.375rem;
}
.pdf-color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
}
.pdf-color-swatch {
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 9999px;
  border: 2px solid #e2e8f0;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.pdf-color-swatch.active {
  border-color: #059669;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px #059669;
  transform: scale(1.08);
}
.pdf-color-custom-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.pdf-color-native-wrap {
  display: flex;
  flex-shrink: 0;
  cursor: pointer;
}
.pdf-color-native {
  width: 2.25rem;
  height: 2rem;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  cursor: pointer;
  background: transparent;
}
.pdf-color-hex {
  flex: 1;
  min-width: 0;
  font-size: 0.8125rem;
  padding: 0.375rem 0.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  font-family: ui-monospace, monospace;
}
.pdf-canvas-tool-palette-controls--text {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem 0.75rem;
}
.pdf-canvas-text-toolbar {
  position: absolute;
  top: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.625rem;
  background: rgb(255 255 255 / 0.96);
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 24px rgb(15 23 42 / 0.12);
  max-width: calc(100% - 1rem);
}
.pdf-canvas-toolbar-label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pdf-canvas-toolbar-select {
  font-size: 0.8125rem;
  padding: 0.25rem 0.375rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  background: #fff;
  color: #1e293b;
}
.pdf-canvas-font-select { max-width: 10rem; }
.pdf-canvas-font-custom {
  font-size: 0.8125rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  min-width: 8rem;
  max-width: 11rem;
}
.pdf-canvas-font-custom.hidden { display: none; }
.pdf-canvas-toolbar-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.pdf-canvas-color-btn {
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 9999px;
  border: 2px solid #e2e8f0;
  cursor: pointer;
  padding: 0;
}
.pdf-canvas-color-btn.active {
  border-color: #059669;
  transform: scale(1.1);
}
.pdf-canvas-sig-composer {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  width: min(20rem, calc(100% - 2rem));
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  background: rgb(255 255 255 / 0.98);
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 32px rgb(15 23 42 / 0.15);
}
.pdf-canvas-sig-title {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 0.5rem;
}
.pdf-canvas-sig-input {
  width: 100%;
  padding: 0.5rem 0.625rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}
.pdf-canvas-sig-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.pdf-canvas-sig-row .pdf-canvas-toolbar-select { flex: 1; }
.pdf-canvas-sig-btn {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.5rem;
  border-radius: 0.5rem;
  border: none;
  background: #002d72;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
}
.pdf-canvas-sig-btn:disabled { opacity: 0.6; cursor: wait; }
.pdf-canvas-sig-hint {
  margin-top: 0.375rem;
  font-size: 0.6875rem;
  color: #64748b;
  text-align: center;
}
.pdf-overlay-canvas { position: absolute; left: 0; top: 0; z-index: 2; touch-action: none; cursor: crosshair; }
.pdf-loading { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; background: rgb(255 255 255 / 0.75); font-size: 0.875rem; font-weight: 600; color: #475569; }
.pdf-loading.hidden { display: none; }
.pdf-status-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.375rem 1rem; border-top: 1px solid #cbd5e1; background: #fff; font-size: 0.75rem; color: #64748b; }
.pdf-edit-hint { flex-shrink: 0; padding: 0.5rem 1rem; background: #eff6ff; border-bottom: 1px solid #bfdbfe; font-size: 0.75rem; color: #1d4ed8; }
.pdf-edit-hint.hidden { display: none; }
.pdf-tool-list { display: flex; flex-direction: column; gap: 0.125rem; }
.pdf-tool-btn {
  display: flex; align-items: flex-start; gap: 0.625rem; width: 100%;
  padding: 0.5rem 0.625rem; border-radius: 0.625rem;
  border: 1px solid transparent; background: transparent;
  text-align: left; cursor: pointer; transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.pdf-tool-btn:hover { background: #f1f5f9; border-color: #e2e8f0; }
.pdf-tool-btn:active { transform: scale(0.98); }
.pdf-tool-btn.active {
  background: #002d72; border-color: #00255e; color: #fff;
  box-shadow: 0 2px 8px rgb(0 45 114 / 0.2);
}
.pdf-tool-btn.active .pdf-tool-hint { color: rgb(255 255 255 / 0.75); }
.pdf-tool-icon { display: flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; flex-shrink: 0; border-radius: 0.5rem; background: #f1f5f9; color: #334155; }
.pdf-tool-icon svg { width: 1.125rem; height: 1.125rem; }
.pdf-tool-btn.active .pdf-tool-icon { background: rgb(255 255 255 / 0.15); color: #fff; }
.pdf-tool-text { min-width: 0; flex: 1; padding-top: 0.125rem; }
.pdf-tool-name { display: block; font-size: 0.8125rem; font-weight: 600; line-height: 1.2; }
.pdf-tool-hint { display: block; font-size: 0.625rem; color: #94a3b8; line-height: 1.3; margin-top: 0.125rem; }
.pdf-btn-primary, .pdf-btn-secondary, .pdf-btn-danger { display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem; }
.pdf-btn-primary svg, .pdf-btn-secondary svg, .pdf-btn-danger svg, .pdf-icon-btn svg { width: 1rem; height: 1rem; flex-shrink: 0; }
.pdf-btn-primary { padding: 0.5rem 0.875rem; border-radius: 0.5rem; border: none; background: #002d72; color: #fff; font-size: 0.8125rem; font-weight: 700; cursor: pointer; transition: background 0.15s; }
.pdf-btn-primary:hover { background: #00255e; }
.pdf-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.pdf-btn-secondary { padding: 0.5rem 0.875rem; border-radius: 0.5rem; border: 1px solid #e2e8f0; background: #fff; color: #334155; font-size: 0.8125rem; font-weight: 600; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.pdf-btn-secondary:hover { background: #f8fafc; border-color: #cbd5e1; }
.pdf-btn-lg { padding: 0.625rem 1.25rem; font-size: 0.875rem; }
.pdf-btn-danger { padding: 0.5rem 0.875rem; border-radius: 0.5rem; border: 1px solid #fecaca; background: #fef2f2; color: #dc2626; font-size: 0.8125rem; font-weight: 700; cursor: pointer; }
.pdf-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 0.5rem; border: 1px solid #e2e8f0; background: #fff; cursor: pointer; color: #334155; transition: background 0.15s; }
.pdf-icon-btn:hover { background: #f1f5f9; }
.pdf-icon-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pdf-page-nav, .pdf-zoom-nav { display: flex; align-items: center; gap: 0.375rem; }
.pdf-field-input { width: 100%; border-radius: 0.5rem; border: 1px solid #e2e8f0; padding: 0.5rem 0.625rem; font-size: 0.8125rem; background: #fff; }
.pdf-check-label { display: flex; align-items: center; gap: 0.375rem; font-size: 0.8125rem; font-weight: 600; color: #334155; }
.pdf-sig-tabs { display: flex; gap: 0.25rem; margin-bottom: 0.75rem; padding: 0.125rem; background: #f1f5f9; border-radius: 0.5rem; }
.pdf-sig-tab { flex: 1; padding: 0.375rem 0.5rem; border: none; border-radius: 0.375rem; background: transparent; font-size: 0.6875rem; font-weight: 700; color: #64748b; cursor: pointer; }
.pdf-sig-tab.active { background: #fff; color: #059669; box-shadow: 0 1px 2px rgb(0 0 0 / 0.06); }
.pdf-sig-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
.pdf-sig-thumb { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; padding: 0.5rem; border-radius: 0.5rem; border: 2px solid #e2e8f0; background: #fff; cursor: pointer; min-height: 4rem; justify-content: center; }
.pdf-sig-thumb:hover { border-color: #6ee7b7; background: #ecfdf5; }
.pdf-sig-thumb.active { border-color: #059669; background: #ecfdf5; box-shadow: 0 0 0 1px #059669; }
.pdf-sig-thumb-label { font-size: 0.625rem; color: #64748b; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-upload-screen { flex: 1; display: flex; align-items: center; justify-content: center; padding: 1.5rem; background: #eef2f6; min-height: 20rem; }
.pdf-upload-card { max-width: 28rem; width: 100%; padding: 2rem 1.5rem; border-radius: 1rem; border: 2px dashed #cbd5e1; background: #fff; text-align: center; cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s; }
.pdf-upload-card:hover, .pdf-upload-card.is-dragover { border-color: #002d72; box-shadow: 0 8px 24px rgb(0 45 114 / 0.08); transform: translateY(-1px); }
.pdf-upload-card.is-dragover { background: #eef4fb; }
.pdf-upload-icon { display: flex; justify-content: center; color: #002d72; margin-bottom: 0.875rem; }
.pdf-upload-title { font-size: 1.25rem; font-weight: 800; color: #0f172a; }
.pdf-upload-desc { margin-top: 0.5rem; font-size: 0.8125rem; color: #64748b; }
.pdf-editor-layout.sidebar-collapsed .pdf-panels { margin-left: -248px; }
@media (max-width: 1023px) {
  .pdf-panels {
    position: absolute; left: 0; top: 0; bottom: 0; z-index: 40;
    box-shadow: 4px 0 24px rgb(0 0 0 / 0.15); transition: margin-left 0.2s;
  }
  .pdf-editor-layout { position: relative; }
  .pdf-editor-layout.sidebar-collapsed .pdf-panels { margin-left: -248px; }
  .pdf-sidebar { width: 248px; }
}

/* SEO content block */
.pdf-seo-grid { display: grid; gap: 1.5rem; margin-top: 2rem; }
@media (min-width: 768px) { .pdf-seo-grid { grid-template-columns: 1fr 1fr; } }
.pdf-seo-card { border-radius: 0.75rem; border: 1px solid #e2e8f0; background: #fff; padding: 1.25rem; }
.pdf-seo-card h3 { font-size: 1rem; font-weight: 700; color: #0f172a; margin-bottom: 0.5rem; }
.pdf-seo-card p, .pdf-seo-card li { font-size: 0.875rem; line-height: 1.65; color: #475569; }
.pdf-seo-card ul { margin-top: 0.5rem; padding-left: 1.125rem; list-style: disc; }

/* Invoice / Rent Receipt — canvas workspace */
#invoice-generator-app,
#rent-receipt-app { display: block; }

.inv-page-intro {
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

.invoice-app,
.rent-receipt-app {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 34rem;
  max-height: 88vh;
  border-bottom: 1px solid #cbd5e1;
}

.inv-canvas-wrap {
  flex: 1;
  min-height: 28rem;
  overflow: auto;
  position: relative;
  background-color: #d8e0ea;
  background-image: radial-gradient(circle, #b8c4d4 1px, transparent 1px);
  background-size: 18px 18px;
}

.inv-canvas-inner {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100%;
  padding: 2.5rem 1.5rem 6rem;
}

.inv-sheet-stage {
  transform-origin: top center;
  transition: transform 0.15s ease;
}

.inv-sheet {
  width: 210mm;
  max-width: calc(100vw - 2rem);
  min-height: 297mm;
  margin: 0 auto;
  padding: 14mm 16mm 16mm;
  background: #fff;
  color: #0f172a;
  font-size: 0.875rem;
  border-radius: 2px;
  box-shadow: 0 2px 4px rgb(15 23 42 / 0.06), 0 16px 48px rgb(15 23 42 / 0.14);
  border: 1px solid rgb(15 23 42 / 0.08);
}

.inv-canvas-hint {
  position: fixed;
  top: calc(4.5rem + 0.5rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  padding: 0.3125rem 0.75rem;
  border-radius: 9999px;
  background: rgb(15 23 42 / 0.72);
  color: rgb(255 255 255 / 0.92);
  font-size: 0.6875rem;
  font-weight: 600;
  pointer-events: none;
  white-space: nowrap;
}

.inv-float-toolbar {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 45;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  max-width: calc(100vw - 1.5rem);
  padding: 0.5rem 0.625rem;
  border-radius: 0.875rem;
  border: 1px solid #cbd5e1;
  background: rgb(255 255 255 / 0.96);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 32px rgb(15 23 42 / 0.14);
}

.inv-float-toolbar-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
}

.inv-float-toolbar-group + .inv-float-toolbar-group {
  padding-left: 0.5rem;
  border-left: 1px solid #e2e8f0;
}

.inv-toolbar-label {
  font-size: 0.5625rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  margin-right: 0.125rem;
}

.inv-pill {
  padding: 0.3125rem 0.625rem;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.inv-pill:hover { border-color: #002d72; color: #002d72; }
.inv-pill.active { background: #002d72; border-color: #00255e; color: #fff; }

.inv-btn-primary,
.inv-btn-secondary,
.inv-btn-ghost,
.inv-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.4375rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.inv-btn-icon {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  font-size: 1rem;
  line-height: 1;
}

.inv-btn-icon:hover { background: #f1f5f9; }
.inv-btn-primary { border: none; background: #002d72; color: #fff; }
.inv-btn-primary:hover { background: #00255e; }
.inv-btn-primary:disabled { opacity: 0.6; cursor: wait; }
.inv-btn-secondary { border: 1px solid #e2e8f0; background: #fff; color: #334155; }
.inv-btn-secondary:hover { background: #f8fafc; border-color: #cbd5e1; }
.inv-btn-ghost { border: none; background: transparent; color: #64748b; font-size: 0.6875rem; padding: 0.3125rem 0.5rem; }
.inv-btn-ghost:hover { color: #dc2626; }

.inv-download-fab {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 55;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: 9999px;
  background: #002d72;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 28px rgb(0 45 114 / 0.35);
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}

.inv-download-fab:hover {
  background: #00255e;
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgb(0 45 114 / 0.4);
}

.inv-download-fab:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.inv-inp {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px dashed transparent;
  padding: 0.125rem 0;
  color: inherit;
  border-radius: 0;
  transition: border-color 0.12s, background 0.12s;
}

.inv-inp:hover {
  border-bottom-color: #6ee7b7;
  background: rgb(236 253 245 / 0.35);
}

.inv-inp:focus {
  outline: none;
  border-bottom-color: #059669;
  background: rgb(236 253 245 / 0.55);
}

.inv-inp::placeholder { color: #cbd5e1; }

.inv-sheet-header {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  padding-bottom: 0.875rem;
  border-bottom: 2px solid #002d72;
}

.inv-logo-area { flex-shrink: 0; width: 5.5rem; }
.inv-logo-img { max-width: 5.5rem; max-height: 4rem; object-fit: contain; display: block; }

.inv-logo-upload,
.inv-logo-placeholder {
  width: 5.5rem;
  height: 3.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.125rem;
  border: 1px dashed #cbd5e1;
  border-radius: 0.375rem;
  font-size: 0.625rem;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.inv-logo-upload:hover {
  border-color: #059669;
  background: #ecfdf5;
  color: #059669;
}

.inv-title-block { flex: 1; min-width: 0; }

.inv-title {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #002d72;
  line-height: 1.1;
}

.inv-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.625rem 1rem;
  margin-top: 0.625rem;
}

.inv-meta-label {
  display: block;
  font-size: 0.5625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

.inv-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.inv-party-label {
  font-size: 0.5625rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #002d72;
  margin-bottom: 0.25rem;
}

.inv-party { display: flex; flex-direction: column; gap: 0.0625rem; }

.inv-table-wrap { margin-bottom: 0.875rem; overflow-x: auto; }

.inv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.inv-table th {
  padding: 0.4375rem 0.3125rem;
  text-align: left;
  font-size: 0.5625rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
  background: #002d72;
}

.inv-table th:nth-child(3),
.inv-table th:nth-child(4),
.inv-table th:nth-child(5),
.inv-table th:nth-child(6) { text-align: center; }

.inv-table th:nth-child(7) { text-align: right; }

.inv-td { padding: 0.3125rem 0.25rem; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.inv-td-num { width: 1.5rem; text-align: center; color: #94a3b8; font-size: 0.6875rem; }
.inv-td-sm { width: 3.75rem; }
.inv-td-gst { width: 4rem; text-align: center; white-space: nowrap; }
.inv-gst-input { display: inline-block; width: 2rem !important; text-align: center; }
.inv-gst-pct { font-size: 0.625rem; color: #94a3b8; }
.inv-td-amt { width: 5rem; }
.inv-td-del { width: 1.25rem; text-align: center; }

.inv-remove-btn {
  width: 1.125rem;
  height: 1.125rem;
  border: none;
  border-radius: 9999px;
  background: #fef2f2;
  color: #dc2626;
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.12s;
}

.inv-table tr:hover .inv-remove-btn { opacity: 1; }

.inv-gst-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.5rem;
}

.inv-preset-btn {
  padding: 0.125rem 0.5rem;
  border-radius: 0.375rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
}

.inv-preset-btn:hover { border-color: #002d72; color: #002d72; background: #eef4fb; }

.inv-bottom {
  display: grid;
  grid-template-columns: 1fr min(13rem, 38%);
  gap: 1.25rem;
  align-items: start;
}

.inv-totals {
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  padding: 0.625rem 0.875rem;
  background: #fafbfc;
}

.inv-total-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.1875rem 0;
  font-size: 0.75rem;
  color: #475569;
}

.inv-total-grand {
  margin-top: 0.3125rem;
  padding-top: 0.4375rem;
  border-top: 2px solid #002d72;
  font-size: 0.9375rem;
  font-weight: 800;
  color: #002d72;
}

.inv-select {
  border-radius: 0.3125rem;
  border: 1px solid #e2e8f0;
  padding: 0.1875rem 0.3125rem;
  font-size: 0.6875rem;
  background: #fff;
  color: #334155;
}

.inv-float-toolbar .inv-btn-secondary input[type="file"] {
  display: none;
}

.inv-canvas-inner > .inv-sheet {
  margin: 0;
}

@media (max-width: 767px) {
  .inv-sheet { padding: 10mm 8mm 12mm; min-height: auto; }
  .inv-parties, .inv-bottom, .inv-meta-grid { grid-template-columns: 1fr; }
  .inv-sheet-header { flex-direction: column; }
  .inv-float-toolbar { bottom: 0.625rem; padding: 0.4375rem; border-radius: 0.75rem; }
  .inv-float-toolbar-group + .inv-float-toolbar-group { padding-left: 0.375rem; }
  .inv-download-fab { right: 0.75rem; bottom: 4.5rem; padding: 0.625rem 1rem; font-size: 0.8125rem; }
}

.inv-export-host {
  position: fixed;
  left: -9999px;
  top: 0;
  z-index: -1;
  pointer-events: none;
}

.inv-sheet-export {
  width: 210mm;
  background: #fff;
  box-shadow: none;
}

.inv-export-value {
  display: inline-block;
  min-height: 1em;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── Rent Receipt Generator ── */
.rent-receipt-app { min-height: 34rem; max-height: 88vh; }
.rent-sheet { width: 100%; max-width: 48rem; min-height: auto; padding: 2rem 2.25rem 2.5rem; }
.rent-sheet-header { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: flex-start; padding-bottom: 1rem; border-bottom: 2px solid #002d72; margin-bottom: 1rem; }
.rent-sheet-kicker { font-size: 0.625rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; color: #002d72; }
.rent-meta-col { display: flex; flex-direction: column; gap: 0.375rem; min-width: 11rem; }
.rent-party-block { border-radius: 0.75rem; border: 1px dashed #e2e8f0; padding: 0.875rem; transition: border-color 0.12s, background 0.12s; }
.rent-party-block:hover { border-color: #a8c9eb; background: rgb(238 244 251 / 0.35); }
.rent-amount-block { margin-top: 1rem; border-radius: 0.75rem; background: #f8fafc; padding: 1rem 1.125rem; border: 1px solid #e2e8f0; }
.rent-words strong { color: #0f172a; }
.rent-cash-note { margin-top: 1rem; border-radius: 0.5rem; border: 1px solid #fde68a; background: #fffbeb; padding: 0.625rem 0.875rem; font-size: 0.75rem; color: #92400e; }
.rent-signature { margin-top: 2.5rem; display: flex; flex-direction: column; align-items: flex-end; }
.rent-signature-line { width: 11rem; border-top: 1px dashed #cbd5e1; }
.rent-multi-banner { flex-shrink: 0; text-align: center; padding: 0.5rem 1rem; background: #eef4fb; border-bottom: 1px solid #d5e4f5; font-size: 0.75rem; font-weight: 600; color: #00255e; }
@media (max-width: 767px) { .rent-sheet { padding: 1.25rem 1rem 1.5rem; } .rent-meta-col { min-width: 100%; } }

/* ── Homepage (Tax Samjho brand) ── */
.home-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #001535 0%, #00255e 45%, #9a3412 100%);
  color: #fff;
}

.home-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 80% 20%, rgb(234 84 6 / 0.28), transparent 50%),
    radial-gradient(ellipse at 10% 80%, rgb(255 255 255 / 0.07), transparent 45%);
  pointer-events: none;
}

.home-hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 0.75rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
}

.home-hero-btn-primary {
  background: #ea5406;
  color: #fff;
  box-shadow: 0 10px 20px rgb(234 84 6 / 0.3);
}

.home-hero-btn-primary:hover { background: #c2410c; }

.home-hero-btn-secondary {
  border: 1px solid rgb(255 255 255 / 0.35);
  background: rgb(255 255 255 / 0.1);
  color: #fff;
  backdrop-filter: blur(8px);
}

.home-hero-btn-secondary:hover { background: rgb(255 255 255 / 0.2); }

.home-hero-btn-ghost {
  border: 1px solid rgb(255 255 255 / 0.2);
  color: rgb(255 255 255 / 0.92);
}

.home-hero-btn-ghost:hover { background: rgb(255 255 255 / 0.1); }

.home-hero-lucide { width: 1.125rem; height: 1.125rem; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.home-hero-lucide svg,
.home-stat-lucide svg,
.home-spotlight-lucide svg,
.home-cta-lucide svg,
.home-calc-lucide svg,
.home-why-lucide svg,
.home-feature-check svg {
  width: 100%;
  height: 100%;
  display: block;
  stroke: currentColor;
  fill: none;
}

.home-stats-bar {
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  padding: 2.5rem 0;
}

.home-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 1.25rem;
  text-align: center;
}

.home-stat-lucide {
  width: 1.25rem;
  height: 1.25rem;
  color: #002d72;
  margin: 0 auto 0.375rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.home-stat-value { font-size: 1.5rem; font-weight: 800; color: #002d72; }
.home-stat-label { margin-top: 0.25rem; font-size: 0.875rem; color: #64748b; }

.home-spotlight-grid { display: grid; gap: 1.5rem; }

@media (min-width: 1024px) {
  .home-spotlight-grid { grid-template-columns: repeat(3, 1fr); }
}

.home-spotlight-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgb(15 23 42 / 0.06);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.home-spotlight-card:hover {
  border-color: #a8c9eb;
  box-shadow: 0 8px 24px rgb(0 45 114 / 0.1);
}

.home-spotlight-card-head {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
}

.home-spotlight-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: #eef4fb;
  color: #002d72;
  flex-shrink: 0;
}

.home-spotlight-lucide { width: 1.5rem; height: 1.5rem; }

.home-spotlight-tag {
  font-size: 0.625rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #002d72;
}

.home-spotlight-title {
  font-size: 1.125rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
}

.home-spotlight-title a { color: inherit; text-decoration: none; }
.home-spotlight-title a:hover { color: #002d72; }

.home-spotlight-desc {
  margin-top: 0.875rem;
  font-size: 0.875rem;
  line-height: 1.65;
  color: #475569;
  flex: 1;
}

.home-spotlight-features {
  margin-top: 0.875rem;
  padding: 0;
  list-style: none;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: #64748b;
}

.home-spotlight-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.375rem;
  margin-bottom: 0.25rem;
}

.home-feature-check {
  width: 0.875rem;
  height: 0.875rem;
  color: #059669;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.home-spotlight-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 1.25rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #002d72;
  text-decoration: none;
}

.home-spotlight-cta:hover { color: #ea5406; }

.home-cta-lucide { width: 1rem; height: 1rem; }

.home-calc-card {
  display: block;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgb(15 23 42 / 0.06);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.home-calc-card:hover {
  border-color: #a8c9eb;
  box-shadow: 0 8px 24px rgb(0 45 114 / 0.08);
}

.home-calc-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.625rem;
  background: #eef4fb;
  color: #002d72;
  margin-bottom: 0.75rem;
}

.home-calc-lucide { width: 1.25rem; height: 1.25rem; }

.home-why-card-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.home-why-card-head h3 { margin-bottom: 0; font-size: 1rem; font-weight: 700; color: #0f172a; }

.home-why-lucide { width: 1.25rem; height: 1.25rem; color: #002d72; flex-shrink: 0; }

.home-tool-placeholder-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 16rem;
  padding: 2rem 1.5rem;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
}

.home-tool-placeholder {
  max-width: 32rem;
  text-align: center;
  padding: 2rem;
  border-radius: 1rem;
  border: 1px dashed #cbd5e1;
  background: #fff;
}

/* Prose & calculators — extra polish */
.prose h3 { font-size: 1.125rem; font-weight: 700; color: #0f172a; margin-top: 1.5rem; margin-bottom: 0.75rem; }
.prose strong { color: #0f172a; }
.prose a { color: #002d72; font-weight: 600; }
.prose a:hover { text-decoration: underline; }

.field-input:focus {
  outline: none;
  border-color: #002d72;
  box-shadow: 0 0 0 3px rgb(0 45 114 / 0.12);
}

.calculator-card-header h2,
.calculator-card-header h3 { font-size: 1rem; font-weight: 700; color: #0f172a; }

body.pdf-editing #pdf-editor-app { flex: 1; min-height: 0; display: flex; flex-direction: column; }
