        :root { --app-bg: #F3F4F6; --app-border: #E5E7EB; --app-primary: #2563EB; --app-success: #16A34A; --app-warning: #F59E0B; --font-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif; --font-serif: Georgia, "Times New Roman", Times, serif; --paper-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.10), 0 10px 10px -5px rgba(0, 0, 0, 0.04); --inv-font: var(--font-sans); --inv-title-font: var(--inv-font); --inv-field-font: var(--inv-font); --inv-body-size: 0.96rem; --inv-line-height: 1.5; --inv-field-size: 0.92rem; --inv-field-line-height: 1.5; --inv-title-size: 2.25rem; --inv-title-min-size: 1.08rem; --inv-title-column-min: 400px; --inv-title-column-max: 500px; --inv-header-gap: 1.35rem; --inv-meta-width: 340px; --inv-meta-gap-x: 0.95rem; --inv-meta-label-size: 0.72rem; --inv-meta-input-size: 0.9rem; --inv-item-header-size: 0.72rem; --inv-item-header-weight: 800; --inv-item-header-letter-spacing: 0.05em; --inv-item-header-transform: uppercase; --inv-item-header-color: var(--inv-text-muted); --inv-item-header-focus-color: var(--inv-primary); --inv-item-header-opacity: 1; --inv-summary-size: 0.93rem; --inv-tax-size: 0.85rem; --inv-tax-name-width: 96px; --inv-tax-rate-width: 48px; --inv-grand-total-size: 1.5rem; --inv-grand-total-label-size: 0.92rem; --inv-grand-total-value-size: 2rem; --inv-input-padding-y: 0.2rem; --inv-input-padding-x: 0.3rem; --inv-input-radius: 6px; --inv-input-min-height: 0; --inv-input-hover-border: var(--inv-border); --inv-input-hover-bg: rgba(249, 250, 251, 0.55); --inv-input-focus-border: var(--app-primary); --inv-input-focus-ring: 0 0 0 3px rgba(37, 99, 235, 0.14); --inv-input-focus-bg: #FFFFFF; --inv-item-header-margin-bottom: 0.9rem; --inv-item-header-padding: 0.65rem 0.85rem 0.55rem; --inv-item-header-radius: 16px; --inv-item-header-bg: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.94) 100%); --inv-item-header-shadow: inset 0 1px 0 rgba(255,255,255,0.92); --inv-item-header-border-top: 1px solid rgba(203, 213, 225, 0.86); --inv-item-header-border-right: 1px solid rgba(203, 213, 225, 0.86); --inv-item-header-border-bottom: 1px solid rgba(203, 213, 225, 0.86); --inv-item-header-border-left: 1px solid rgba(203, 213, 225, 0.86); }

        .invoice-container { --inv-footer-rule-width: 1px; --inv-footer-rule-style: solid; --inv-footer-rule-color: var(--inv-border); --inv-footer-label-color: var(--inv-text-muted); --inv-footer-brand-color: var(--inv-primary); --inv-footer-label-transform: uppercase; --inv-footer-label-spacing: 0.08em; --inv-footer-label-weight: 600; --inv-footer-label-font: var(--inv-font); --inv-footer-brand-font: var(--inv-title-font); --inv-footer-brand-weight: 700; --inv-footer-brand-spacing: 0.015em; --inv-footer-brand-style: normal; }

        /* Themes */
        .theme-minimal { --inv-font: var(--font-sans); --inv-title-font: var(--font-sans); --inv-field-font: var(--font-sans); --inv-body-size: 0.95rem; --inv-field-size: 0.91rem; --inv-title-size: 2rem; --inv-meta-label-size: 0.71rem; --inv-meta-input-size: 0.88rem; --inv-summary-size: 0.92rem; --inv-tax-size: 0.84rem; --inv-grand-total-size: 1.55rem; --inv-grand-total-value-size: 1.95rem; --inv-text: #111827; --inv-text-muted: #4B5563; --inv-primary: #111827; --inv-bg: #FFFFFF; --inv-border: #D1D5DB; --inv-radius: 2px; }
        .theme-minimal .inv-title-box input.title { font-size: 2rem; letter-spacing: -0.03em; }
        .theme-minimal .meta-grid label { color: #6B7280; }
        .theme-minimal .grand-total { font-size: 1.55rem; }
        .theme-minimal .grand-total span:last-child { color: #111827; }
        .theme-modern { --inv-font: var(--font-sans); --inv-title-font: var(--font-sans); --inv-field-font: var(--font-sans); --inv-body-size: 0.98rem; --inv-field-size: 0.94rem; --inv-title-size: 2.32rem; --inv-meta-label-size: 0.73rem; --inv-meta-input-size: 0.92rem; --inv-summary-size: 0.95rem; --inv-tax-size: 0.87rem; --inv-grand-total-value-size: 2.08rem; --inv-text: #0F172A; --inv-text-muted: #475569; --inv-primary: #2563EB; --inv-bg: #FFFFFF; --inv-border: #CBD5E1; --inv-radius: 8px; }
        .theme-modern .inv-header { padding-bottom: 0.75rem; border-bottom: 1px solid rgba(37, 99, 235, 0.16); }
        .theme-modern .inv-title-box input.title { letter-spacing: -0.04em; }
        .theme-modern .grand-total { color: var(--inv-primary); border-top-color: rgba(37, 99, 235, 0.35); }
        .theme-modern .summary-line:last-of-type { border-bottom-color: rgba(37, 99, 235, 0.2); }
        .theme-modern .grand-total span:first-child { color: #64748B; }
        .theme-classic { --inv-font: var(--font-serif); --inv-title-font: var(--font-serif); --inv-field-font: var(--font-serif); --inv-body-size: 0.99rem; --inv-field-size: 0.94rem; --inv-title-size: 2.18rem; --inv-meta-label-size: 0.74rem; --inv-meta-input-size: 0.92rem; --inv-summary-size: 0.96rem; --inv-tax-size: 0.88rem; --inv-grand-total-label-size: 0.9rem; --inv-grand-total-value-size: 2rem; --inv-text: #1F2937; --inv-text-muted: #6B7280; --inv-primary: #374151; --inv-bg: #FFFFFF; --inv-border: #D6D3D1; --inv-radius: 0px; --inv-footer-rule-color: #CFC8C2; --inv-footer-label-spacing: 0.06em; --inv-footer-label-font: var(--font-serif); --inv-footer-brand-font: var(--font-serif); --inv-footer-brand-weight: 600; --inv-footer-brand-spacing: 0.03em; }
        .theme-classic .inv-title-box input.title { font-weight: 600; letter-spacing: 0.06em; }
        .theme-classic .inv-header { padding-bottom: 0.85rem; border-bottom: 1px solid #D6D3D1; }
        .theme-classic .grand-total { border-top-width: 1px; }
        .theme-classic .grand-total span:first-child { font-size: 0.88rem; }
        .theme-corporate { --inv-font: var(--font-sans); --inv-title-font: var(--font-sans); --inv-field-font: var(--font-sans); --inv-body-size: 0.93rem; --inv-field-size: 0.89rem; --inv-title-size: 2rem; --inv-meta-label-size: 0.69rem; --inv-meta-input-size: 0.86rem; --inv-summary-size: 0.9rem; --inv-tax-size: 0.82rem; --inv-grand-total-label-size: 0.86rem; --inv-grand-total-value-size: 1.95rem; --inv-text: #111827; --inv-text-muted: #4B5563; --inv-primary: #1D4ED8; --inv-bg: #FFFFFF; --inv-border: #94A3B8; --inv-radius: 4px; --inv-footer-rule-width: 2px; --inv-footer-rule-color: #1D4ED8; --inv-footer-label-color: #64748B; --inv-footer-brand-color: #1D4ED8; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
        .theme-corporate .item-header input { color: var(--inv-item-header-color) !important; }
        .theme-corporate .inv-header { padding-bottom: 0.9rem; border-bottom: 2px solid #1D4ED8; }
        .theme-corporate .inv-title-box input.title { font-size: 2rem; letter-spacing: -0.04em; }
        .theme-corporate .grand-total { color: #1D4ED8; border-top-color: #1D4ED8; }
        .theme-corporate .summary-line { border-bottom-color: rgba(148, 163, 184, 0.42); }
        .theme-corporate .grand-total span:first-child { color: #1E40AF; }
        .theme-corporate .grand-total span:last-child { color: #1D4ED8; }
        .theme-executive { --inv-font: var(--font-serif); --inv-title-font: var(--font-serif); --inv-field-font: var(--font-serif); --inv-body-size: 1rem; --inv-field-size: 0.95rem; --inv-title-size: 2.08rem; --inv-meta-label-size: 0.74rem; --inv-meta-input-size: 0.92rem; --inv-summary-size: 0.95rem; --inv-tax-size: 0.87rem; --inv-grand-total-label-size: 0.9rem; --inv-grand-total-value-size: 2.02rem; --inv-text: #262626; --inv-text-muted: #737373; --inv-primary: #7C5A46; --inv-bg: #FCFBFA; --inv-border: #E5E5E5; --inv-radius: 0px; --inv-footer-rule-color: rgba(124, 90, 70, 0.22); --inv-footer-label-color: #8B7D76; --inv-footer-label-font: var(--font-serif); --inv-footer-label-spacing: 0.1em; --inv-footer-brand-font: var(--font-serif); --inv-footer-brand-weight: 600; --inv-footer-brand-spacing: 0.04em; }
        .theme-executive .inv-header { padding-top: 0.5rem; }
        .theme-executive .inv-title-box input.title { letter-spacing: 0.06em; font-size: 2.05rem; }
        .theme-executive .meta-grid label { color: #8B7D76; }
        .theme-executive .summary-line { border-bottom-color: rgba(124, 90, 70, 0.16); }
        .theme-executive .grand-total { border-top-width: 1px; color: var(--inv-primary); }
        .theme-executive .grand-total span:first-child { color: #8B7D76; }
        
        .theme-studio { --inv-font: var(--font-sans); --inv-title-font: var(--font-sans); --inv-field-font: var(--font-sans); --inv-body-size: 1rem; --inv-field-size: 0.95rem; --inv-title-size: 2.36rem; --inv-meta-label-size: 0.73rem; --inv-meta-input-size: 0.92rem; --inv-summary-size: 0.96rem; --inv-tax-size: 0.87rem; --inv-grand-total-label-size: 0.9rem; --inv-grand-total-value-size: 2.12rem; --inv-text: #111111; --inv-text-muted: #6B7280; --inv-primary: #111111; --inv-bg: #FFFFFF; --inv-border: #111111; --inv-radius: 0px; --inv-footer-rule-width: 2px; --inv-footer-rule-color: #000000; --inv-footer-label-color: #111111; --inv-footer-brand-color: #000000; --inv-footer-label-transform: none; --inv-footer-label-spacing: -0.01em; --inv-footer-label-weight: 900; box-shadow: 8px 8px 0px rgba(17,17,17,0.08); }
        .theme-studio .summary-line { border-bottom: 1px dashed #000; }
        .theme-studio .grand-total { border-top: 4px solid #000; }
        .theme-studio .inv-title-box input.title { color: #000 !important; font-weight: 900; letter-spacing: -1px; }
        .theme-studio .inv-header { padding-bottom: 0.6rem; border-bottom: 2px solid #000; }
        .theme-studio .meta-grid label { color: #000; }
        .theme-studio .amount-cell, .theme-studio .grand-total { letter-spacing: -0.02em; }
        .theme-studio .grand-total span:first-child { color: #111; }

        .theme-terminal { --inv-font: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; --inv-title-font: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; --inv-field-font: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; --inv-body-size: 0.92rem; --inv-field-size: 0.88rem; --inv-title-size: 1.9rem; --inv-meta-label-size: 0.69rem; --inv-meta-input-size: 0.86rem; --inv-summary-size: 0.88rem; --inv-tax-size: 0.8rem; --inv-grand-total-label-size: 0.84rem; --inv-grand-total-value-size: 1.86rem; --inv-text: #1F2937; --inv-text-muted: #6B7280; --inv-primary: #047857; --inv-bg: #FFFFFF; --inv-border: #D1D5DB; --inv-radius: 0px; --inv-footer-rule-style: dashed; --inv-footer-rule-color: #1F2937; --inv-footer-label-color: #4B5563; --inv-footer-brand-color: #047857; --inv-footer-label-transform: none; --inv-footer-label-spacing: 0; --inv-footer-label-weight: 700; --inv-footer-label-font: var(--inv-field-font); --inv-footer-brand-font: var(--inv-field-font); --inv-footer-brand-weight: 800; --inv-footer-brand-spacing: 0; background-image: linear-gradient(#F9FAFB 1px, transparent 1px); background-size: 100% 2rem; }
        .theme-terminal input, .theme-terminal textarea { font-family: var(--inv-field-font); }
        .theme-terminal .summary-line { border-bottom: 1px dashed #D1D5DB; }
        .theme-terminal .grand-total { border-top: 2px dashed #1F2937; }
        .theme-terminal .inv-header { border-bottom: 1px dashed #1F2937; padding-bottom: 0.65rem; }
        .theme-terminal .inv-title-box input.title { font-size: 1.9rem; letter-spacing: 0; }
        .theme-terminal .meta-grid label { color: #4B5563; }
        .theme-terminal .amount-cell, .theme-terminal .grand-total { color: #047857; }
        .theme-terminal .grand-total span:first-child { color: #1F2937; }

        .theme-boutique { --inv-font: var(--font-serif); --inv-title-font: var(--font-serif); --inv-field-font: var(--font-serif); --inv-body-size: 1rem; --inv-field-size: 0.95rem; --inv-title-size: 2.1rem; --inv-meta-label-size: 0.74rem; --inv-meta-input-size: 0.92rem; --inv-summary-size: 0.95rem; --inv-tax-size: 0.87rem; --inv-grand-total-label-size: 0.9rem; --inv-grand-total-value-size: 2.08rem; --inv-text: #43302B; --inv-text-muted: #8C7B76; --inv-primary: #C66A4A; --inv-bg: #FFFCF9; --inv-border: #E8DFDA; --inv-radius: 16px; --inv-footer-rule-color: rgba(198, 106, 74, 0.22); --inv-footer-label-color: #9A7B72; --inv-footer-brand-color: #C66A4A; --inv-footer-label-transform: none; --inv-footer-label-spacing: 0.04em; --inv-footer-label-font: var(--font-serif); --inv-footer-brand-font: var(--font-serif); --inv-footer-brand-weight: 600; --inv-footer-brand-spacing: 0.03em; background-color: var(--inv-bg); }
        .theme-boutique input, .theme-boutique textarea { font-family: var(--inv-field-font); color: #43302B; }
        .theme-boutique .grand-total { border-top: 1px solid var(--inv-primary); color: var(--inv-primary); }
        .theme-boutique .inv-header { border-bottom: 1px solid rgba(198, 106, 74, 0.18); padding-bottom: 0.65rem; }
        .theme-boutique .inv-title-box input.title { font-size: 2.05rem; letter-spacing: 0.03em; }
        .theme-boutique .meta-grid label { color: #9A7B72; }
        .theme-boutique .summary-line { border-bottom-color: rgba(198, 106, 74, 0.14); }
        .theme-boutique .grand-total span:first-child { color: #9A7B72; }
        .theme-compact { --inv-font: var(--font-sans); --inv-title-font: var(--font-sans); --inv-field-font: var(--font-sans); --inv-body-size: 0.84rem; --inv-line-height: 1.34; --inv-field-size: 0.82rem; --inv-field-line-height: 1.35; --inv-title-size: 1.7rem; --inv-title-min-size: 0.94rem; --inv-title-column-min: 300px; --inv-title-column-max: 340px; --inv-header-gap: 1rem; --inv-meta-width: 280px; --inv-meta-gap-x: 0.72rem; --inv-meta-label-size: 0.62rem; --inv-meta-input-size: 0.78rem; --inv-item-header-size: 0.62rem; --inv-summary-size: 0.82rem; --inv-tax-size: 0.74rem; --inv-tax-name-width: 94px; --inv-tax-rate-width: 54px; --inv-grand-total-size: 1.12rem; --inv-grand-total-label-size: 0.76rem; --inv-grand-total-value-size: 1.45rem; --inv-text: #0F172A; --inv-text-muted: #475569; --inv-primary: #0F172A; --inv-bg: #FFFFFF; --inv-border: #CBD5E1; --inv-radius: 0px; line-height: 1.34; padding: 2.1rem 2rem 1.8rem; }
        .theme-compact .inv-status-stamp { top: 0.8rem; right: 2rem; }
        .theme-compact .inv-status-stamp label { font-size: 0.6rem; }
        .theme-compact .inv-status-stamp select { font-size: 0.66rem; padding: 0.24rem 0.58rem; }
        .theme-compact .inv-header { min-height: 78px; margin-bottom: 1.45rem; }
        .theme-compact .logo-upload-box { width: 130px; height: 64px; font-size: 0.66rem; }
        .theme-compact .inv-title-box input.title { font-size: 1.7rem; letter-spacing: -0.04em; margin-bottom: 0.28rem; }
        .theme-compact .meta-grid { gap: 0.22rem var(--inv-meta-gap-x); }
        .theme-compact .meta-grid label { font-size: 0.62rem; }
        .theme-compact .meta-grid input { font-size: 0.78rem; }
        .theme-compact .address-grid { gap: 1.55rem; margin-top: 1.2rem; margin-bottom: 1.35rem; }
        .theme-compact .label-row { margin-bottom: 0.28rem; }
        .theme-compact .btn-templates { font-size: 0.55rem; }
        .theme-compact .items-table { margin-bottom: 1rem; }
        .theme-compact .item-grid { grid-template-columns: 1fr 64px 82px 94px 20px; gap: 0.62rem; }
        .theme-compact .item-row { margin-bottom: 0.12rem; }
        .theme-compact .amount-cell { font-size: 0.78rem; padding-top: 0.16rem; }
        .theme-compact .btn-add { font-size: 0.74rem; margin-top: 0.35rem; }
        .theme-compact .bottom-grid { grid-template-columns: minmax(0, 1fr) 250px; gap: 1.45rem; margin-top: 1rem; }
        .theme-compact .summary-line { font-size: 0.82rem; padding: 0.08rem 0; }
        .theme-compact .tax-config { font-size: 0.74rem; gap: 3px; }
        .theme-compact .tax-config input { width: 38px; }
        .theme-compact #inv-tax-name { width: var(--inv-tax-name-width) !important; }
        .theme-compact #inv-tax-rate { width: var(--inv-tax-rate-width) !important; }
        .theme-compact .grand-total { font-size: 1.12rem; padding-top: 0.52rem; margin-top: 0.24rem; }
        .theme-compact .grand-total span:first-child { font-size: 0.76rem; }
        .theme-compact .grand-total span:last-child { font-size: 1.45rem; letter-spacing: -0.02em; }
        .theme-compact .internal-notes { margin-top: 1rem; padding: 0.7rem; }
        .theme-compact .internal-notes label { font-size: 0.62rem; margin-bottom: 0.3rem; }
        .theme-compact .signature-section { margin-top: 1rem; }
        .theme-compact .signature-pad { width: min(100%, 312px); }
        .theme-compact .signature-pad-stage { height: 108px; }
        .theme-compact .watermark { font-size: 0.6rem; padding-bottom: 3.5mm; }
        .theme-dense { --inv-font: var(--font-sans); --inv-title-font: var(--font-sans); --inv-field-font: var(--font-sans); --inv-body-size: 0.78rem; --inv-line-height: 1.24; --inv-field-size: 0.74rem; --inv-field-line-height: 1.2; --inv-title-size: 1.42rem; --inv-title-min-size: 0.84rem; --inv-title-column-min: 260px; --inv-title-column-max: 300px; --inv-header-gap: 0.85rem; --inv-meta-width: 240px; --inv-meta-gap-x: 0.55rem; --inv-meta-label-size: 0.56rem; --inv-meta-input-size: 0.7rem; --inv-item-header-size: 0.56rem; --inv-summary-size: 0.74rem; --inv-tax-size: 0.68rem; --inv-tax-name-width: 84px; --inv-tax-rate-width: 48px; --inv-grand-total-size: 0.96rem; --inv-grand-total-label-size: 0.66rem; --inv-grand-total-value-size: 1.22rem; --inv-text: #111827; --inv-text-muted: #64748B; --inv-primary: #0F172A; --inv-bg: #FFFFFF; --inv-border: #D6DEE9; --inv-radius: 0px; line-height: 1.24; padding: 1.6rem 1.55rem 1.3rem; }
        .theme-dense .inv-status-stamp { top: 0.72rem; right: 1.55rem; gap: 6px; }
        .theme-dense .inv-status-stamp label { font-size: 0.55rem; }
        .theme-dense .inv-status-stamp select { font-size: 0.62rem; padding: 0.22rem 0.48rem; }
        .theme-dense .inv-header { min-height: 66px; margin-bottom: 1rem; }
        .theme-dense .logo-upload-box { width: 108px; height: 52px; font-size: 0.58rem; }
        .theme-dense .inv-title-box { padding-top: 0; }
        .theme-dense .inv-title-box input.title { font-size: 1.42rem; margin-bottom: 0.18rem; letter-spacing: -0.05em; }
        .theme-dense .meta-grid { gap: 0.12rem var(--inv-meta-gap-x); }
        .theme-dense .meta-grid label { font-size: 0.56rem; }
        .theme-dense .meta-grid input { font-size: 0.7rem; }
        .theme-dense .address-grid { gap: 1rem; margin-top: 0.9rem; margin-bottom: 1rem; }
        .theme-dense .label-row { margin-bottom: 0.2rem; }
        .theme-dense .btn-templates { font-size: 0.52rem; padding: 1px 3px; }
        .theme-dense .items-table { margin-bottom: 0.75rem; }
        .theme-dense .item-grid { grid-template-columns: 1fr 52px 72px 84px 18px; gap: 0.46rem; }
        .theme-dense .item-row { margin-bottom: 0.08rem; }
        .theme-dense .amount-cell { font-size: 0.72rem; padding-top: 0.08rem; }
        .theme-dense .btn-remove { font-size: 0.9rem; }
        .theme-dense .btn-add { font-size: 0.68rem; margin-top: 0.2rem; }
        .theme-dense .bottom-grid { grid-template-columns: minmax(0, 1fr) 220px; gap: 1rem; margin-top: 0.72rem; }
        .theme-dense .summary-line { font-size: 0.74rem; padding: 0.04rem 0; }
        .theme-dense .tax-config { font-size: 0.68rem; gap: 2px; }
        .theme-dense .tax-config input { width: 34px; }
        .theme-dense #inv-tax-name { width: var(--inv-tax-name-width) !important; }
        .theme-dense #inv-tax-rate { width: var(--inv-tax-rate-width) !important; }
        .theme-dense .grand-total { font-size: 0.96rem; padding-top: 0.4rem; margin-top: 0.18rem; }
        .theme-dense .grand-total span:first-child { font-size: 0.66rem; }
        .theme-dense .grand-total span:last-child { font-size: 1.22rem; letter-spacing: -0.02em; }
        .theme-dense .internal-notes { margin-top: 0.72rem; padding: 0.55rem; }
        .theme-dense .internal-notes label { font-size: 0.56rem; margin-bottom: 0.22rem; }
        .theme-dense .signature-section { margin-top: 0.75rem; }
        .theme-dense .signature-pad { width: min(100%, 276px); }
        .theme-dense .signature-pad-stage { height: 96px; }
        .theme-dense .watermark { font-size: 0.54rem; padding-bottom: 2.5mm; }

        /* Theme-specific field surfaces */
        .theme-minimal { --inv-input-padding-y: 0.16rem; --inv-input-padding-x: 0.24rem; --inv-input-radius: 2px; --inv-input-hover-border: #D1D5DB; --inv-input-hover-bg: rgba(249, 250, 251, 0.42); --inv-input-focus-border: #111827; --inv-input-focus-ring: 0 0 0 2px rgba(17, 24, 39, 0.08); --inv-item-header-margin-bottom: 0.82rem; --inv-item-header-padding: 0 0 0.42rem; --inv-item-header-radius: 0; --inv-item-header-bg: transparent; --inv-item-header-shadow: none; --inv-item-header-border-top: none; --inv-item-header-border-right: none; --inv-item-header-border-bottom: 1px solid #D1D5DB; --inv-item-header-border-left: none; }
        .theme-modern { --inv-input-padding-y: 0.22rem; --inv-input-padding-x: 0.34rem; --inv-input-radius: 8px; --inv-input-hover-border: rgba(148, 163, 184, 0.72); --inv-input-hover-bg: rgba(248, 250, 252, 0.88); --inv-input-focus-border: #2563EB; --inv-input-focus-ring: 0 0 0 3px rgba(37, 99, 235, 0.14); --inv-item-header-margin-bottom: 0.88rem; --inv-item-header-padding: 0.58rem 0.72rem 0.5rem; --inv-item-header-radius: 12px; --inv-item-header-bg: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(239,246,255,0.86) 100%); --inv-item-header-shadow: inset 0 1px 0 rgba(255,255,255,0.9); --inv-item-header-border-top: 1px solid rgba(191, 219, 254, 0.9); --inv-item-header-border-right: 1px solid rgba(191, 219, 254, 0.9); --inv-item-header-border-bottom: 1px solid rgba(191, 219, 254, 0.9); --inv-item-header-border-left: 1px solid rgba(191, 219, 254, 0.9); }
        .theme-classic { --inv-input-padding-y: 0.14rem; --inv-input-padding-x: 0.18rem; --inv-input-radius: 0; --inv-input-hover-border: #D6D3D1; --inv-input-hover-bg: rgba(245, 244, 242, 0.62); --inv-input-focus-border: #6B7280; --inv-input-focus-ring: 0 0 0 2px rgba(107, 114, 128, 0.08); --inv-item-header-margin-bottom: 0.8rem; --inv-item-header-padding: 0 0 0.38rem; --inv-item-header-radius: 0; --inv-item-header-bg: transparent; --inv-item-header-shadow: none; --inv-item-header-border-top: none; --inv-item-header-border-right: none; --inv-item-header-border-bottom: 1px solid #CFC8C2; --inv-item-header-border-left: none; }
        .theme-corporate { --inv-input-padding-y: 0.15rem; --inv-input-padding-x: 0.24rem; --inv-input-radius: 3px; --inv-input-hover-border: rgba(59, 130, 246, 0.42); --inv-input-hover-bg: rgba(239, 246, 255, 0.62); --inv-input-focus-border: #1D4ED8; --inv-input-focus-ring: 0 0 0 2px rgba(29, 78, 216, 0.14); --inv-item-header-margin-bottom: 0.9rem; --inv-item-header-padding: 0.75rem 1rem 0.62rem; --inv-item-header-radius: 4px; --inv-item-header-bg: var(--inv-primary); --inv-item-header-shadow: none; --inv-item-header-border-top: none; --inv-item-header-border-right: none; --inv-item-header-border-bottom: none; --inv-item-header-border-left: none; --inv-item-header-color: #FFFFFF; --inv-item-header-focus-color: #FFFFFF; }
        .theme-executive { --inv-input-padding-y: 0.15rem; --inv-input-padding-x: 0.2rem; --inv-input-radius: 0; --inv-input-hover-border: rgba(124, 90, 70, 0.26); --inv-input-hover-bg: rgba(252, 251, 250, 0.88); --inv-input-focus-border: #7C5A46; --inv-input-focus-ring: 0 0 0 2px rgba(124, 90, 70, 0.1); --inv-item-header-margin-bottom: 0.82rem; --inv-item-header-padding: 0 0 0.4rem; --inv-item-header-radius: 0; --inv-item-header-bg: transparent; --inv-item-header-shadow: none; --inv-item-header-border-top: none; --inv-item-header-border-right: none; --inv-item-header-border-bottom: 1px solid rgba(124, 90, 70, 0.22); --inv-item-header-border-left: none; }
        .theme-studio { --inv-input-padding-y: 0.08rem; --inv-input-padding-x: 0.08rem; --inv-input-radius: 0; --inv-input-hover-border: transparent; --inv-input-hover-bg: rgba(17, 17, 17, 0.03); --inv-input-focus-border: transparent; --inv-input-focus-ring: none; --inv-input-focus-bg: rgba(17, 17, 17, 0.03); --inv-item-header-margin-bottom: 1.5rem; --inv-item-header-padding: 0.5rem 0; --inv-item-header-radius: 0; --inv-item-header-bg: transparent; --inv-item-header-shadow: none; --inv-item-header-border-top: 2px solid #000000; --inv-item-header-border-right: none; --inv-item-header-border-bottom: 2px solid #000000; --inv-item-header-border-left: none; --inv-item-header-color: #000000; --inv-item-header-focus-color: #000000; --inv-item-header-weight: 900; --inv-item-header-letter-spacing: -0.01em; --inv-item-header-transform: none; }
        .theme-terminal { --inv-input-padding-y: 0.1rem; --inv-input-padding-x: 0.16rem; --inv-input-radius: 0; --inv-input-hover-border: rgba(31, 41, 55, 0.34); --inv-input-hover-bg: rgba(236, 253, 245, 0.46); --inv-input-focus-border: #047857; --inv-input-focus-ring: 0 0 0 2px rgba(4, 120, 87, 0.12); --inv-input-focus-bg: rgba(236, 253, 245, 0.68); --inv-item-header-margin-bottom: 0.78rem; --inv-item-header-padding: 0 0 0.42rem; --inv-item-header-radius: 0; --inv-item-header-bg: transparent; --inv-item-header-shadow: none; --inv-item-header-border-top: none; --inv-item-header-border-right: none; --inv-item-header-border-bottom: 1px dashed #1F2937; --inv-item-header-border-left: none; --inv-item-header-color: #4B5563; --inv-item-header-focus-color: #047857; --inv-item-header-weight: 700; --inv-item-header-letter-spacing: 0; --inv-item-header-transform: none; }
        .theme-boutique { --inv-input-padding-y: 0.18rem; --inv-input-padding-x: 0.3rem; --inv-input-radius: 10px; --inv-input-hover-border: rgba(198, 106, 74, 0.28); --inv-input-hover-bg: rgba(255, 248, 242, 0.86); --inv-input-focus-border: #C66A4A; --inv-input-focus-ring: 0 0 0 3px rgba(198, 106, 74, 0.12); --inv-input-focus-bg: #FFFCF9; --inv-item-header-margin-bottom: 0.82rem; --inv-item-header-padding: 0 0 0.42rem; --inv-item-header-radius: 0; --inv-item-header-bg: transparent; --inv-item-header-shadow: none; --inv-item-header-border-top: none; --inv-item-header-border-right: none; --inv-item-header-border-bottom: 1px solid var(--inv-border); --inv-item-header-border-left: none; --inv-item-header-opacity: 0.8; }
        .theme-compact { --inv-input-padding-y: 0.14rem; --inv-input-padding-x: 0.22rem; --inv-input-radius: 0; --inv-input-hover-border: rgba(148, 163, 184, 0.5); --inv-input-hover-bg: rgba(248, 250, 252, 0.76); --inv-input-focus-border: #0F172A; --inv-input-focus-ring: 0 0 0 2px rgba(15, 23, 42, 0.08); --inv-item-header-margin-bottom: 0.45rem; --inv-item-header-padding: 0 0 0.24rem; --inv-item-header-radius: 0; --inv-item-header-bg: transparent; --inv-item-header-shadow: none; --inv-item-header-border-top: none; --inv-item-header-border-right: none; --inv-item-header-border-bottom: 1px solid rgba(203, 213, 225, 0.86); --inv-item-header-border-left: none; }
        .theme-dense { --inv-input-padding-y: 0.1rem; --inv-input-padding-x: 0.16rem; --inv-input-radius: 0; --inv-input-hover-border: rgba(148, 163, 184, 0.42); --inv-input-hover-bg: rgba(248, 250, 252, 0.72); --inv-input-focus-border: #0F172A; --inv-input-focus-ring: 0 0 0 2px rgba(15, 23, 42, 0.08); --inv-item-header-margin-bottom: 0.3rem; --inv-item-header-padding: 0 0 0.18rem; --inv-item-header-radius: 0; --inv-item-header-bg: transparent; --inv-item-header-shadow: none; --inv-item-header-border-top: none; --inv-item-header-border-right: none; --inv-item-header-border-bottom: 1px solid rgba(214, 222, 233, 0.92); --inv-item-header-border-left: none; }

        * { margin: 0; padding: 0; box-sizing: border-box; }
        body { background-color: var(--app-bg); font-family: var(--font-sans); color: #111827; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow: hidden; }

        /* Navbar */
        nav { background: #fff; min-height: var(--nav-base-height, 65px); display: flex; align-items: center; border-bottom: 1px solid var(--app-border); position: relative; z-index: 1000; padding-right: 1.25rem;}
        .logo-area { width: 240px; min-height: var(--nav-base-height, 65px); padding-left: 1.5rem; display: flex; align-items: center; border-right: 1px solid var(--app-border); flex-shrink: 0; }
        .logo { font-size: 1.25rem; font-weight: 700; text-decoration: none; color: #111827; letter-spacing: -0.5px;}
        .logo span { color: var(--app-primary); }
        .app-nav-links { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
        .app-nav-links a { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 0.45rem 0.75rem; border-radius: 999px; color: #475569; text-decoration: none; font-size: 0.8rem; font-weight: 700; border: 1px solid transparent; transition: 0.2s; }
        .app-nav-links a:hover { color: #1D4ED8; background: #EFF6FF; border-color: #BFDBFE; }
        .nav-controls { flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 18px; padding-left: 20px; min-width: 0; }
        .nav-secondary-controls { flex: 1; min-width: 0; display: flex; justify-content: flex-end; align-items: center; gap: 15px; flex-wrap: wrap; }
        .nav-secondary-controls > * { flex-shrink: 0; }
        .nav-secondary-controls > div:not(#backup-reminder):not(.nav-language-picker) { display: flex; align-items: center; min-width: 0; }
        .mobile-nav-summary { display: none; }
        .mobile-nav-new-invoice { display: none; appearance: none; align-items: center; justify-content: center; gap: 0.18rem; min-height: 42px; padding: 0 0.95rem; border-radius: 14px; border: 1px solid rgba(37, 99, 235, 0.9); background: linear-gradient(180deg, #2563EB 0%, #1D4ED8 100%); color: #FFFFFF; font-size: 0.78rem; font-weight: 800; letter-spacing: -0.01em; box-shadow: 0 14px 28px rgba(37, 99, 235, 0.2), inset 0 1px 0 rgba(255,255,255,0.16); }
        .mobile-nav-new-invoice-plus { font-size: 1rem; line-height: 1; }
        .save-status-indicator { font-size: 0.75rem; color: #6B7280; display: flex; align-items: center; gap: 0.4rem; font-weight: 600; min-width: 0; }
        .save-status-dot { display: inline-block; width: 6px; height: 6px; background: #10B981; border-radius: 50%; flex: 0 0 6px; }
        .save-status-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .mobile-menu-toggle { display: none; }
        .mobile-menu-toggle-icon,
        .mobile-menu-toggle-icon::before,
        .mobile-menu-toggle-icon::after { display: block; width: 16px; height: 2px; border-radius: 999px; background: #0F172A; transition: transform 0.18s ease, top 0.18s ease, opacity 0.18s ease, background 0.18s ease; }
        .mobile-menu-toggle-icon { position: relative; }
        .mobile-menu-toggle-icon::before,
        .mobile-menu-toggle-icon::after { content: ""; position: absolute; left: 0; }
        .mobile-menu-toggle-icon::before { top: -5px; }
        .mobile-menu-toggle-icon::after { top: 5px; }
        button { -webkit-tap-highlight-color: transparent; }
        .btn-sync { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 38px; padding: 0.55rem 1rem; border-radius: 999px; border: 1px solid rgba(203, 213, 225, 0.96); background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(241,245,249,0.92) 100%); color: #0F172A; cursor: pointer; font-size: 0.84rem; font-weight: 700; letter-spacing: -0.01em; box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255,255,255,0.88); transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease, opacity 0.18s ease; }
        .btn-sync:hover { transform: translateY(-1px); background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(248,250,252,0.96) 100%); border-color: rgba(148, 163, 184, 0.9); box-shadow: 0 14px 28px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255,255,255,0.94); }
        .btn-sync:disabled { background: rgba(226, 232, 240, 0.9) !important; color: #94A3B8 !important; border-color: rgba(203, 213, 225, 0.82) !important; cursor: not-allowed; box-shadow: none !important; transform: none !important; }
        .btn-sync:focus-visible,
        .btn-nudge:focus-visible,
        .view-toggle button:focus-visible,
        .filter-btn:focus-visible,
        .btn-reminder:focus-visible,
        .btn-del-history:focus-visible,
        .btn-clone-credit:focus-visible,
        .btn-related-doc:focus-visible,
        .btn-context-primary:focus-visible,
        .btn-remove-logo:focus-visible,
        .btn-templates:focus-visible,
        .btn-remove:focus-visible,
        .btn-add:focus-visible,
        .signature-action-btn:focus-visible,
        .signature-upload-btn:focus-visible,
        .btn-remove-watermark:focus-visible,
        .btn-close-modal:focus-visible,
        .btn-download:focus-visible,
        .btn-save-status:focus-visible,
        .mobile-menu-toggle:focus-visible,
        .sync-modal-action:focus-visible,
        .sync-modal-cancel:focus-visible,
        .ai-reminder-primary:focus-visible,
        .ai-reminder-secondary:focus-visible,
        button[onclick="openWaitlistModal('ai_paste_panel')"]:focus-visible,
        button[onclick="runQuickParser()"]:focus-visible,
        #btn-submit-waitlist:focus-visible,
        #mobile-sig-modal button[onclick="confirmMobileSig()"]:focus-visible,
        #mobile-sig-modal button[onclick="clearMobileSig()"]:focus-visible {
            outline: none;
            box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.2), 0 14px 28px rgba(15, 23, 42, 0.12);
        }
        .mobile-history-btn { display: none; }
        .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; }
        .form-intake-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
        
        .backup-warning { background: #FEF3C7; color: #92400E; font-size: 0.75rem; padding: 0.3rem 0.6rem; border-radius: 6px; font-weight: 700; display: none; align-items: center; gap: 4px; border: 1px solid #FDE68A; cursor: pointer;}
        @keyframes pulse-yellow { 0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(245, 158, 11, 0); } 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); } }
        .relink-urgent { animation: pulse-yellow 2s infinite; background: #FFFBEB; color: #B45309; border: 1px solid #F59E0B !important; }
        body.history-sidebar-hidden .logo-area { width: 188px; }
        body.history-sidebar-hidden .nav-controls { gap: 12px; }

        /* Layout */
        .app-layout { display: flex; height: calc(100dvh - var(--nav-height, var(--nav-base-height, 65px))); min-height: 0; overflow: hidden; }
        .sidebar { width: 340px; background: #fff; border-right: 1px solid var(--app-border); display: flex; flex-direction: column; flex-shrink: 0; min-height: 0; transition: transform 0.3s ease; }
        /* Sidebar Pulse & Sparkline */
        .sparkline { display: flex; align-items: flex-end; gap: 2px; height: 16px; margin-top: 6px; }
        .sparkline-bar { flex: 1; background: #D1FAE5; border-radius: 1px; min-width: 3px; }
        .red-dot-count { background: #EF4444; color: #fff; font-size: 0.6rem; padding: 1px 5px; border-radius: 10px; margin-left: 4px; vertical-align: middle; }
        
        /* BI Dashboard Professional Refinement */
        #bi-dashboard { display: none; height: 100%; background: #F9FAFB; overflow: hidden; }
        #bi-dashboard.active { display: flex; }
        
        .bi-sidebar-nav { width: 64px; background: #fff; border-right: 1px solid #E5E7EB; display: flex; flex-direction: column; align-items: center; padding: 1.5rem 0; gap: 1rem; flex-shrink: 0; }
        .bi-nav-item { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 10px; color: #9CA3AF; text-decoration: none; transition: 0.2s; position: relative; font-size: 1.1rem; }
        .bi-nav-item:hover { background: #F3F4F6; color: var(--app-primary); }
        .bi-nav-item.active { background: #EEF2FF; color: var(--app-primary); }
        .bi-nav-item span { position: absolute; left: 80%; top: 50%; transform: translateY(-50%); background: #111827; color: #fff; font-size: 0.6rem; padding: 4px 8px; border-radius: 4px; white-space: nowrap; opacity: 0; pointer-events: none; transition: 0.2s; z-index: 100; }
        .bi-nav-item:hover span { opacity: 1; left: 110%; }
        
        .bi-content-area { flex: 1; overflow-y: auto; padding: 1.5rem 2rem; scroll-behavior: smooth; }
        .bi-max-container { max-width: 900px; margin: 0 auto; }
        
        .bi-page-section { margin-bottom: 3rem; }
        .bi-page-section h3 { font-size: 1.1rem; font-weight: 800; color: #111827; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 12px; }
        .bi-page-section h3::after { content: ''; flex: 1; height: 1px; background: #E5E7EB; }
        
        .bi-section { background: #fff; border: 1px solid #E5E7EB; border-radius: 12px; padding: 1.25rem; box-shadow: 0 1px 2px rgba(0,0,0,0.03); }
        .bi-section h4 { font-size: 0.7rem; text-transform: uppercase; color: #6B7280; margin-bottom: 1rem; letter-spacing: 0.05em; font-weight: 800; display: flex; align-items: center; gap: 6px; }
        
        .aging-row { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1rem; background: #F9FAFB; border-radius: 10px; margin-bottom: 8px; border: 1px solid #F3F4F6; }
        .aging-row.urgent { border-color: #FCA5A5; background: #FFF1F2; border-left: 4px solid #EF4444; }
        
        .tax-summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
        .tax-stat-box { padding: 1rem; border-radius: 12px; border: 1px solid #E5E7EB; background: #fff; }
        .tax-stat-box .label { display: block; font-size: 0.55rem; font-weight: 800; color: #6B7280; margin-bottom: 4px; text-transform: uppercase; }
        .tax-stat-box .value { font-size: 1.1rem; font-weight: 900; color: #111827; }
        
        .bi-mini-label { font-size: 0.65rem; color: #9CA3AF; margin-top: 6px; font-style: italic; }
        .btn-nudge { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 0.5rem 0.95rem; border-radius: 999px; border: 1px solid rgba(15, 23, 42, 0.9); background: linear-gradient(180deg, #1F2937 0%, #111827 100%); color: #F8FAFC; font-size: 0.72rem; font-weight: 700; cursor: pointer; box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18), inset 0 1px 0 rgba(255,255,255,0.12); transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease; }
        .btn-nudge:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(15, 23, 42, 0.22), inset 0 1px 0 rgba(255,255,255,0.16); }
        
        .client-risk-warning { background: #FFFBEB; border: 1px solid #FDE68A; color: #92400E; padding: 10px; border-radius: 8px; font-size: 0.75rem; margin-top: 15px; font-weight: 600; }
        
        .main-content { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; overflow: hidden; position: relative; background: var(--app-bg); min-width: 0; }
        .scroll-area { flex: 1; min-height: 0; overflow-y: auto; padding: 0 1.25rem 1.5rem; }

        /* Sidebar Elements */
        .sidebar-header { padding: 0.55rem 0.7rem 0.5rem; border-bottom: 1px solid var(--app-border); display: flex; flex-direction: column; gap: 0.42rem;}
        .sidebar-header-row { display: flex; justify-content: space-between; align-items: center; width: 100%;}
        .sidebar-header h3 { font-size: 0.94rem; font-weight: 800; margin: 0; letter-spacing: -0.01em; }
        
        .view-toggle { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); min-width: 142px; border: 1px solid var(--app-border); border-radius: 7px; overflow: hidden; background: #F8FAFC; }
        .view-toggle button { min-width: 0; border: 0; border-right: 1px solid var(--app-border); background: transparent; min-height: 28px; padding: 0.28rem 0.44rem; font-size: 0.62rem; font-weight: 750; cursor: pointer; border-radius: 0; color: #64748B; transition: 0.18s ease; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .view-toggle button:last-child { border-right: 0; }
        .view-toggle button.active { background: #111827; color: #F8FAFC; box-shadow: inset 0 -2px 0 rgba(255,255,255,0.18); }


        .bi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
        .bi-section { background: #fff; border: 1px solid var(--app-border); border-radius: 12px; padding: 1.5rem; box-shadow: 0 1px 3px rgba(0,0,0,0.02); }
        .bi-section h4 { font-size: 0.8rem; text-transform: uppercase; color: #6B7280; margin-bottom: 1.25rem; letter-spacing: 0.05em; display: flex; align-items: center; gap: 6px; font-weight: 800; }
        
        .currency-pill { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1rem; background: #F9FAFB; border-radius: 8px; margin-bottom: 8px; border: 1px solid transparent; }
        .currency-label { font-weight: 700; font-size: 0.9rem; color: #111827; }
        .currency-values { text-align: right; }
        .val-paid { color: #059669; font-weight: 700; font-size: 0.85rem; }
        .val-pending { color: #D97706; font-size: 0.75rem; font-weight: 600; display: block; }

        .bi-bar-row { margin-bottom: 1.25rem; }
        .bi-bar-label { display: flex; justify-content: space-between; font-size: 0.75rem; font-weight: 700; margin-bottom: 6px; color: #374151; }
        .bi-bar-bg { height: 10px; background: #F3F4F6; border-radius: 5px; overflow: hidden; display: flex; }
        .bi-bar-fill { height: 100%; background: var(--app-primary); transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
        
        .aging-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; height: 40px; margin-top: 10px; }
        .aging-box { border-radius: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 800; color: #fff; cursor: help; }
        .aging-box span { font-size: 0.55rem; opacity: 0.9; font-weight: 400; }
        .aging-0 { background: #10B981; } .aging-30 { background: #F59E0B; } .aging-60 { background: #EF4444; } .aging-90 { background: #7F1D1D; }
        
        .tax-q-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; }
        .tax-q-box { background: #F9FAFB; padding: 10px 4px; border-radius: 8px; text-align: center; border: 1px solid #F3F4F6; }
        .tax-q-box span { display: block; font-weight: 800; color: #9CA3AF; margin-bottom: 4px; text-transform: uppercase; font-size: 0.55rem; }
        .tax-q-amt { font-weight: 700; color: #111827; font-size: 0.65rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        
        .sidebar-btn-group { display: flex; gap: 4px; width: 100%; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 1px; scrollbar-width: none; }
        .sidebar-btn-group::-webkit-scrollbar { display: none; }
        .sidebar-btn-group .filter-btn { flex: 1 0 auto; min-height: 26px; padding: 0.26rem 0.42rem; text-align: center; font-size: 0.6rem; box-shadow: none; }
        .sidebar-new-invoice-actions { padding: 0.42rem 0.56rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr); gap: 0.4rem; border-bottom: 1px solid var(--app-border); background: #fff; }
        .sidebar-new-invoice-actions .btn-add { width: 100%; min-height: 34px; border: 1px solid #111827; padding: 0.38rem 0.52rem; border-radius: 7px; justify-content: center; font-size: 0.72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: #111827; color: #F8FAFC; box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14); }
        .sidebar-new-invoice-actions .btn-add:hover { background: #0F172A; border-color: #0F172A; transform: translateY(-1px); }
        .sidebar-new-invoice-actions .btn-add-gpt { border-color: #2563EB; background: #2563EB; color: #FFFFFF; box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18); }
        .sidebar-new-invoice-actions .btn-add-gpt:hover { border-color: #1D4ED8; background: #1D4ED8; }
        
        .sidebar-dashboard { padding: 0.5rem 0.62rem; background: #F9FAFB; border-bottom: 1px solid var(--app-border); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
        .dash-row { display: contents; }
        .dash-card { min-width: 0; background: #fff; padding: 0.42rem 0.45rem; border-radius: 7px; border: 1px solid var(--app-border); }
        .dash-card span { display: block; font-size: 0.54rem; color: #6B7280; text-transform: uppercase; font-weight: 800; margin-bottom: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .dash-card .value { display: block; height: 1rem; font-size: 0.72rem; font-weight: 800; color: #111827; line-height: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

        .history-search { padding: 0.38rem 0.56rem; background: #fff; border-bottom: 1px solid var(--app-border); display: grid; grid-template-columns: minmax(0, 1fr) minmax(106px, 0.82fr); gap: 4px; align-items: center; }
        .history-search input { width: 100%; min-width: 0; min-height: 30px; padding: 0.34rem 0.46rem; border: 1px solid var(--app-border); border-radius: 6px; font-size: 0.74rem; background: #F9FAFB; outline: none; margin-bottom: 0;}
        .history-search-filters { display: flex; gap: 4px; }
        .history-search-filters select { flex: 1; min-width: 0; min-height: 30px; padding: 3px 5px; font-size: 0.66rem; border: 1px solid var(--app-border); border-radius: 4px; outline: none; background: #F9FAFB; }

        .history-filters { min-width: 0; padding: 0.42rem 0.56rem; border-bottom: 1px solid var(--app-border); display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.34rem; overflow: visible; background: #fff; }
        .history-filters .filter-btn { width: 100%; min-width: 0; min-height: 30px; padding: 0.3rem 0.48rem; border-radius: 6px; border-color: var(--app-border); background: #F8FAFC; font-size: 0.64rem; line-height: 1.1; white-space: nowrap; overflow: visible; text-overflow: clip; box-shadow: none; }
        .history-filters .filter-btn:nth-child(1),
        .history-filters .filter-btn:nth-child(2),
        .history-filters .filter-btn:nth-child(3) { grid-column: span 2; }
        .history-filters .filter-btn:nth-child(4),
        .history-filters .filter-btn:nth-child(5) { display: none; grid-column: span 3; }
        .history-filters.is-sent-expanded .filter-btn:nth-child(4),
        .history-filters.is-sent-expanded .filter-btn:nth-child(5) { display: inline-flex; }
        .history-filters .filter-btn:first-child,
        .history-filters .filter-btn:last-child { border-radius: 6px; }
        .history-filters .filter-btn:hover { transform: none; background: #F1F5F9; border-color: #CBD5E1; box-shadow: none; }
        .history-filters .filter-btn.active { background: #111827; color: #F8FAFC; border-color: #111827; box-shadow: inset 0 -2px 0 rgba(255,255,255,0.18); }
        .filter-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; font-size: 0.68rem; padding: 0.45rem 0.82rem; border-radius: 999px; border: 1px solid rgba(203, 213, 225, 0.92); background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(241,245,249,0.92) 100%); cursor: pointer; white-space: nowrap; font-weight: 700; color: #475569; letter-spacing: -0.01em; box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255,255,255,0.85); transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease; }
        .filter-btn:hover { transform: translateY(-1px); background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(248,250,252,0.96) 100%); border-color: rgba(148, 163, 184, 0.86); box-shadow: 0 12px 22px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255,255,255,0.92); }
        .filter-btn.active { background: linear-gradient(180deg, #1F2937 0%, #111827 100%); color: #F8FAFC; border-color: rgba(15, 23, 42, 0.9); box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18), inset 0 1px 0 rgba(255,255,255,0.12); }
        
        /* History Items & Reminders */
        .history-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0.42rem 0.5rem 0.65rem; overscroll-behavior: contain; }
        .history-item { padding: 0.72rem 0.72rem; border-radius: 8px; cursor: pointer; border: 1px solid transparent; margin-bottom: 0.42rem; position: relative; transition: 0.2s; background: #fff; }
        .history-item:hover { background: #F9FAFB; border-color: #E5E7EB; }
        .history-item.active { background: #EEF2FF; border-color: #C7D2FE; }
        .history-empty-state { padding: 1rem; border-radius: 18px; border: 1px solid rgba(203, 213, 225, 0.92); background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.94) 100%); box-shadow: 0 12px 24px rgba(15, 23, 42, 0.05); }
        .history-empty-state strong { display: block; font-size: 0.92rem; color: #0F172A; margin-bottom: 0.35rem; }
        .history-empty-state p { margin: 0; font-size: 0.8rem; line-height: 1.55; color: #64748B; }
        .history-empty-actions { display: flex; gap: 0.55rem; margin-top: 0.85rem; }
        .inv-no { font-weight: 800; font-size: 0.82rem; line-height: 1.25; display: block; color: #111827; padding-right: 3.1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .inv-date-label { font-size: 0.66rem; color: #6B7280; margin-bottom: 2px; display: block; font-weight: 700; line-height: 1.2; }
        
        .inv-meta-status { display: flex; justify-content: space-between; align-items: flex-end; gap: 0.5rem; margin-top: 5px; }
        .inv-meta-status > div:first-child { min-width: 0; }
        .inv-meta-status > div:last-child { flex-shrink: 0; max-width: 44%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .status-tag { font-size: 0.58rem; padding: 1px 5px; border-radius: 4px; font-weight: 800; text-transform: uppercase; display: inline-block; line-height: 1.45; }
        .status-paid { background: #D1FAE5; color: #065F46; }
        .status-draft { background: #F3F4F6; color: #4B5563; }
        .status-sent { background: #FEF3C7; color: #92400E; }
        .status-overdue { background: #FEE2E2; color: #991B1B; }
        .document-type-tag { margin-left: 0.24rem; padding: 1px 6px; border-radius: 999px; font-size: 0.58rem; font-weight: 800; letter-spacing: 0.02em; display: inline-flex; align-items: center; justify-content: center; background: #E2E8F0; color: #334155; line-height: 1.45; }
        .document-type-tag.type-quotation { background: #EDE9FE; color: #6D28D9; }
        .document-type-tag.type-proforma { background: #DBEAFE; color: #1D4ED8; }
        .document-type-tag.type-commercial { background: #DCFCE7; color: #166534; }
        .document-type-tag.type-packing-list { background: #FEF3C7; color: #92400E; }
        .document-type-tag.type-credit-note { background: #FEE2E2; color: #B91C1C; }

        .due-countdown { font-size: 0.6rem; font-weight: 700; margin-top: 3px; display: block; }
        .due-in { color: var(--app-primary); }
        .due-over { color: #EF4444; }
        .btn-reminder { display: inline-flex; align-items: center; justify-content: center; min-height: 26px; margin-top: 4px; padding: 0.24rem 0.55rem; font-size: 0.62rem; color: #1D4ED8; background: linear-gradient(180deg, rgba(239,246,255,0.98) 0%, rgba(219,234,254,0.92) 100%); border: 1px solid rgba(147, 197, 253, 0.78); border-radius: 999px; cursor: pointer; font-weight: 700; box-shadow: 0 8px 18px rgba(37, 99, 235, 0.08), inset 0 1px 0 rgba(255,255,255,0.76); transition: 0.18s ease; }
        .btn-reminder:hover { transform: translateY(-1px); background: linear-gradient(180deg, rgba(248,250,252,1) 0%, rgba(219,234,254,0.98) 100%); }

        .btn-del-history, .btn-clone-credit, .btn-related-doc { position: absolute; top: 7px; width: 28px; height: 28px; color: #64748B; background: rgba(255,255,255,0.96); border: 1px solid rgba(203, 213, 225, 0.92); border-radius: 999px; cursor: pointer; opacity: 0; transition: 0.18s ease; font-size: 0.78rem; padding: 0; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08); }
        .btn-del-history { right: 8px; }
        .btn-clone-credit, .btn-related-doc { right: 40px; }
        .history-item:hover .btn-del-history, .history-item:hover .btn-clone-credit, .history-item:hover .btn-related-doc { opacity: 1; }
        .btn-del-history:hover { background: rgba(254, 242, 242, 0.98); color: #B91C1C; border-color: rgba(252, 165, 165, 0.82); }
        .btn-clone-credit:hover, .btn-related-doc:hover { background: rgba(248, 250, 252, 0.98); color: #0F172A; border-color: rgba(148, 163, 184, 0.86); }

        /* Toolbar */
        .toolbar { max-width: 850px; margin: 1rem auto 0.45rem; padding: 0.9rem 1.1rem; display: flex; justify-content: space-between; align-items: center; background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%); border: 1px solid #D7E0EC; border-radius: 14px 14px 10px 10px; box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05); gap: 0.8rem; }
        .toolbar-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
        .toolbar-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
        .control-group { display: flex; align-items: center; gap: 8px; font-size: 0.74rem; color: #64748B; font-weight: 700; }
        .control-group select { padding: 0.38rem 0.62rem; border-radius: 8px; border: 1px solid #CFD8E5; outline: none; background: #FFFFFF; cursor: pointer; font-size: 0.8rem; color: #111827; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03); }
        #theme-switch { min-width: 8.6rem; }
        #currency-switch { min-width: 7.4rem; }
        .toolbar-lang-shortcut[hidden] { display: none !important; }
        .toolbar-lang-shortcut.is-active { background: linear-gradient(180deg, rgba(239,246,255,0.98) 0%, rgba(219,234,254,0.94) 100%); border-color: rgba(147,197,253,0.96); color: #1D4ED8; box-shadow: 0 8px 18px rgba(37, 99, 235, 0.08); }
        .toolbar-mobile-paste { display: none; }
        .toolbar-secondary-action { display: inline-flex; }
        .btn-context-primary { transition: 0.18s ease; }
        .btn-context-primary.is-save-local { background: linear-gradient(180deg, rgba(236,253,245,0.98) 0%, rgba(209,250,229,0.92) 100%); color: #047857; border-color: rgba(110, 231, 183, 0.88); box-shadow: 0 10px 22px rgba(16, 185, 129, 0.08), inset 0 1px 0 rgba(255,255,255,0.78); }
        .btn-context-primary.is-save-local:hover { background: linear-gradient(180deg, rgba(244,255,249,1) 0%, rgba(209,250,229,0.98) 100%); }
        .smart-paste-panel { max-width: 850px; margin: 1rem auto 0; padding: 0 1rem; }
        .mobile-preview-note { display: none; margin: 0; color: #475569; font-size: 0.72rem; line-height: 1.5; font-weight: 700; text-align: center; }
        .mobile-item-hint { display: none; margin: 0 0 0.6rem; color: #64748B; font-size: 0.7rem; line-height: 1.45; font-weight: 700; }
        .local-template-rail { max-width: 850px; margin: 0.48rem auto 0; padding: 0 1rem; }
        .local-template-body { display: flex; align-items: flex-start; align-content: flex-start; gap: 0.42rem; flex-wrap: wrap; min-width: 0; overflow: visible; padding-right: 0.08rem; }
        .local-template-card { position: relative; appearance: none; flex: 0 1 auto; min-width: 0; max-width: 156px; min-height: 28px; padding: 0.2rem 0.62rem 0.2rem 0.9rem; border-radius: 999px; border: 1px solid rgba(203, 213, 225, 0.88); background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(248,250,252,0.9) 100%); color: var(--template-ink, #0F172A); font-family: var(--template-font, var(--font-sans)); text-align: left; cursor: pointer; transition: 0.16s ease; overflow: hidden; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); }
        .local-template-card::before { content: ""; position: absolute; left: 0.42rem; top: 50%; width: 0.36rem; height: 0.36rem; border-radius: 999px; background: var(--template-accent, #2563EB); transform: translateY(-50%); box-shadow: 0 0 0 2px var(--template-pill-bg, rgba(37, 99, 235, 0.1)); }
        .local-template-card:hover { transform: translateY(-1px); border-color: rgba(148, 163, 184, 0.76); box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08); }
        .local-template-card.is-active { border-color: var(--template-accent, #2563EB); background: var(--template-pill-bg, rgba(37, 99, 235, 0.1)); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.82); }
        .local-template-title { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.68rem; font-weight: 700; line-height: 1.05; letter-spacing: -0.01em; }
        .local-template-head,
        .local-template-type-row,
        .local-template-type-btn,
        .local-template-type-count,
        .local-template-theme,
        .local-template-meta,
        .local-template-number,
        .local-template-create,
        .local-template-empty { display: none; }
        .local-template-body { scrollbar-width: thin; padding-bottom: 0.08rem; }
        .local-template-body::-webkit-scrollbar { display: none; }
        .local-template-type-row { display: inline-flex; align-items: center; gap: 0.38rem; flex: 0 0 100%; margin-right: 0; padding-bottom: 0.1rem; border-bottom: 1px solid rgba(226, 232, 240, 0.78); }
        .local-template-type-btn,
        .local-template-create { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; min-height: 32px; padding: 0.28rem 0.82rem; border-radius: 999px; border: 1px solid rgba(203, 213, 225, 0.88); background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.92) 100%); color: #475569; cursor: pointer; font-size: 0.68rem; font-weight: 700; letter-spacing: -0.01em; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); transition: 0.16s ease; white-space: nowrap; }
        .local-template-type-btn:hover,
        .local-template-create:hover { transform: translateY(-1px); color: #0F172A; border-color: rgba(148, 163, 184, 0.78); box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08); }
        .local-template-type-btn.is-active { color: #1D4ED8; border-color: rgba(96, 165, 250, 0.94); background: linear-gradient(180deg, rgba(239,246,255,0.98) 0%, rgba(219,234,254,0.94) 100%); box-shadow: 0 8px 18px rgba(37, 99, 235, 0.08); }
        .local-template-create { border-style: dashed; color: #0F172A; background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.88) 100%); }
        .welcome-panel { max-width: 850px; margin: 0.85rem auto 0; padding: 1.15rem 1.25rem; background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%); border: 1px solid #DBEAFE; border-radius: 16px; box-shadow: 0 8px 30px rgba(37, 99, 235, 0.06); }
        .welcome-panel h2 { font-size: 1.2rem; color: #0F172A; margin-bottom: 0.5rem; }
        .welcome-panel p { color: #475569; font-size: 0.92rem; max-width: 640px; }
        .welcome-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 0.85rem; }
        .welcome-chip { display: inline-flex; align-items: center; gap: 6px; padding: 0.55rem 0.9rem; border: 1px solid #BFDBFE; background: #EFF6FF; color: #1D4ED8; border-radius: 999px; font-size: 0.78rem; font-weight: 700; }

        /* Inputs */
        input, textarea { width: 100%; min-height: max(var(--inv-input-min-height), 32px); border: 1px solid transparent; border-radius: var(--inv-input-radius); outline: none; resize: none; font-size: var(--inv-field-size); line-height: var(--inv-field-line-height); background: transparent; color: inherit; font-family: var(--inv-field-font, inherit); transition: 0.2s; padding: var(--inv-input-padding-y) var(--inv-input-padding-x); }
        input:hover, textarea:hover { border-color: var(--inv-input-hover-border); background: var(--inv-input-hover-bg); }
        input:focus, textarea:focus { border-color: var(--inv-input-focus-border); box-shadow: var(--inv-input-focus-ring); background: var(--inv-input-focus-bg); }

        /* Invoice Area */
        .invoice-container { max-width: 850px; margin: 0 auto 2rem; background: #fff; border-radius: var(--inv-radius); box-shadow: var(--paper-shadow); padding: 3rem; border: none; position: relative; font-family: var(--inv-font); font-size: var(--inv-body-size); line-height: var(--inv-line-height); color: var(--inv-text); }
        .inv-status-stamp { position: absolute; top: 1.1rem; right: 3rem; display: flex; align-items: center; gap: 8px; z-index: 100; }
        .inv-status-stamp label { font-size: 0.68rem; font-weight: 700; color: var(--inv-text-muted); letter-spacing: 0.02em; }
        .inv-status-stamp select { appearance: none; min-height: 32px; border: 1px solid currentColor; padding: 0.36rem 0.75rem; border-radius: 999px; font-weight: 700; font-size: 0.72rem; cursor: pointer; background: rgba(255,255,255,0.92); text-transform: uppercase; line-height: 1.1; }
        .inv-status-stamp .btn-sync { min-height: 30px; padding: 0.34rem 0.82rem; font-size: 0.72rem; box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255,255,255,0.84); }

        .inv-header { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--inv-header-gap); margin-bottom: 2.2rem; position: relative; min-height: 92px; }
        .logo-upload-box { flex: 0 0 160px; width: 160px; height: 80px; border: 1px dashed rgba(148, 163, 184, 0.65); border-radius: 4px; display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; overflow: hidden; background: #fff; color: #9CA3AF; font-size: 0.75rem; }
        .logo-upload-box.has-logo { border: 1px solid transparent; background: transparent; color: transparent; }
        .logo-upload-box img { max-width: 100%; max-height: 100%; object-fit: contain; position: absolute; z-index: 10; background: #fff; }
        .logo-upload-box.has-logo img { background: transparent; }
        .logo-upload-box input { position: absolute; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 20; }
        .btn-remove-logo { position: absolute; top: 6px; left: 6px; min-height: 24px; background: rgba(15, 23, 42, 0.86); color: #FFFFFF; border: 1px solid rgba(255,255,255,0.14); padding: 0.2rem 0.5rem; font-size: 0.62rem; z-index: 30; cursor: pointer; display: none; border-radius: 999px; box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18); }
        .logo-upload-box:hover .btn-remove-logo { display: block; }

        .inv-title-box { display: flex; flex: 1 1 var(--inv-title-column-min); flex-direction: column; align-items: flex-end; justify-content: flex-start; width: auto; min-width: 0; max-width: min(100%, var(--inv-title-column-max)); margin-left: auto; padding-top: 0.15rem; }
        .inv-title-box input.title { display: block; width: 100%; max-width: 100%; min-height: 0; padding: 0 !important; border: none !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; appearance: none; -webkit-appearance: none; font-size: var(--inv-title-size); font-weight: 800; text-align: right; text-transform: uppercase; letter-spacing: 0.04em; color: var(--inv-primary); margin-bottom: 0.55rem; line-height: 1; font-family: var(--inv-title-font, var(--inv-font)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; caret-color: var(--inv-primary); touch-action: manipulation; }
        .inv-title-box input.title:hover,
        .inv-title-box input.title:focus { border: none !important; background: transparent !important; box-shadow: none !important; }
        .inv-title-box input.title[readonly] { cursor: default; user-select: none; -webkit-user-select: none; caret-color: transparent; }
        #inv-from, #inv-to, #inv-notes, #inv-internal-notes { display: block; height: auto; overflow: hidden; resize: none; }
        #inv-from, #inv-to { min-height: 5.5rem; }
        #inv-notes { min-height: 7rem; }
        #inv-internal-notes { min-height: 4.75rem; }
        
        .meta-grid { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.38rem var(--inv-meta-gap-x); align-items: center; width: min(100%, var(--inv-meta-width)); max-width: 100%; margin-left: auto; align-self: flex-end; }
        .meta-grid > * { min-width: 0; }
        .meta-grid label { font-size: var(--inv-meta-label-size); font-weight: 600; color: var(--inv-text-muted); text-align: right; letter-spacing: 0.01em; }
        .meta-grid input { text-align: right; font-size: var(--inv-meta-input-size); width: 100%; }
        
        /* Force date input text and components to right align */
        .meta-grid input[type="date"] { text-align: right; display: flex; justify-content: flex-end; }
        .meta-grid input[type="date"]::-webkit-datetime-edit { text-align: right; width: 100%; }
        .meta-grid input[type="date"]::-webkit-calendar-picker-indicator { margin-left: 5px; }
        .invoice-container:not(.not-draft) .meta-grid input,
        .invoice-container:not(.not-draft) #inv-to-email,
        .invoice-container:not(.not-draft) #inv-tax-name,
        .invoice-container:not(.not-draft) #inv-tax-rate,
        .invoice-container:not(.not-draft) #inv-discount,
        .invoice-container:not(.not-draft) #inv-deposit,
        .invoice-container:not(.not-draft) .item-row input,
        .invoice-container:not(.not-draft) .item-row textarea {
            min-height: 32px !important;
        }

        /* Due Date Popover Fixed */
        #invoice-app.is-credit-note .inv-title-box input.title { color: #EF4444 !important; -webkit-text-fill-color: #EF4444 !important; }
        
        .date-input-wrapper { position: relative; width: 100%; }
        .date-presets-popover { position: absolute; top: 100%; right: 0; background: #fff; border: 1px solid var(--app-border); border-radius: 8px; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); z-index: 100; display: none; width: 120px; margin-top: 4px; overflow: hidden; pointer-events: auto; }
        .date-presets-popover div { padding: 8px 12px; font-size: 0.7rem; cursor: pointer; border-bottom: 1px solid #F3F4F6; text-align: left; color: #374151; font-weight: 500; }
        .date-presets-popover div:hover { background: #EEF2FF; color: var(--app-primary); }

        .address-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.75rem; margin-bottom: 2.25rem; margin-top: 2rem; }
        .label-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
        .label-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
        .btn-templates { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 0.34rem 0.74rem; font-size: 0.65rem; color: #334155; background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(241,245,249,0.92) 100%); border: 1px solid rgba(203, 213, 225, 0.88); border-radius: 999px; cursor: pointer; font-weight: 700; letter-spacing: -0.01em; box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05), inset 0 1px 0 rgba(255,255,255,0.84); transition: 0.18s ease; }
        .btn-templates:hover { transform: translateY(-1px); color: #0F172A; border-color: rgba(148, 163, 184, 0.82); }
        
        .items-table { width: 100%; margin-bottom: 1.5rem; }
        .item-grid { display: grid; grid-template-columns: 1fr 80px 100px 120px 24px; gap: 1rem; align-items: start; }
        .item-header { align-items: end; margin-bottom: var(--inv-item-header-margin-bottom); padding: var(--inv-item-header-padding); border-top: var(--inv-item-header-border-top); border-right: var(--inv-item-header-border-right); border-bottom: var(--inv-item-header-border-bottom); border-left: var(--inv-item-header-border-left); border-radius: var(--inv-item-header-radius); background: var(--inv-item-header-bg); box-shadow: var(--inv-item-header-shadow); opacity: var(--inv-item-header-opacity); }
        .item-header input { width: 100%; min-height: 24px; font-size: var(--inv-item-header-size); font-weight: var(--inv-item-header-weight); color: var(--inv-item-header-color); border: none !important; border-radius: 0 !important; padding: 0; background: transparent !important; box-shadow: none !important; letter-spacing: var(--inv-item-header-letter-spacing); line-height: 1.2; text-transform: var(--inv-item-header-transform); }
        .item-header input.text-right { text-align: right; }
        .item-header input:hover,
        .item-header input:focus { border: none !important; background: transparent !important; box-shadow: none !important; color: var(--inv-item-header-focus-color); }
        .item-row { margin-bottom: 0.35rem; position: relative; }
        .item-field { min-width: 0; }
        .amount-cell { padding-top: 0.25rem; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; align-items: flex-end; gap: 0.16rem; }
        .amount-value { display: inline-block; font-size: inherit; line-height: 1.2; font-weight: inherit; color: inherit; }
        .btn-remove { width: 32px; height: 32px; color: #B91C1C; border: 1px solid rgba(252, 165, 165, 0.78); background: rgba(255,255,255,0.95); cursor: pointer; font-size: 1rem; opacity: 0; transition: 0.18s ease; display: inline-flex; justify-content: center; align-items: center; border-radius: 999px; box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06); }
        .item-row:hover .btn-remove { opacity: 1; }
        .btn-remove:hover { background: rgba(254,242,242,0.98); }
        .btn-add { display: inline-flex; align-items: center; justify-content: center; gap: 0.42rem; min-height: 38px; padding: 0.72rem 1.05rem; line-height: 1; white-space: nowrap; color: #0F172A; font-weight: 700; font-size: 0.82rem; border: 1px solid rgba(203, 213, 225, 0.9) !important; background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(241,245,249,0.92) 100%) !important; cursor: pointer; margin-top: 0.5rem; border-radius: 999px !important; box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255,255,255,0.88); transition: 0.18s ease; }
        .btn-add:hover { transform: translateY(-1px); background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(248,250,252,0.96) 100%) !important; border-color: rgba(148, 163, 184, 0.84) !important; }
        .items-table > .btn-add { gap: 0.26rem; padding-inline: 0.96rem; }
        .items-table > .btn-add::before { content: "+"; font-size: 1rem; font-weight: 600; line-height: 1; }
        .sidebar-new-invoice-actions > .btn-add { min-height: 34px; margin-top: 0; padding: 0.38rem 0.52rem; border-radius: 7px !important; border-color: #111827 !important; background: #111827 !important; color: #F8FAFC; box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14); }
        .sidebar-new-invoice-actions > .btn-add:hover { background: #0F172A !important; border-color: #0F172A !important; }
        .sidebar-new-invoice-actions > .btn-add-gpt { border-color: #2563EB !important; background: #2563EB !important; color: #FFFFFF; box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18); }
        .sidebar-new-invoice-actions > .btn-add-gpt:hover { border-color: #1D4ED8 !important; background: #1D4ED8 !important; }

        .bottom-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2.5rem; margin-top: 1.5rem; }
        .summary-line { display: flex; justify-content: space-between; align-items: baseline; padding: 0.2rem 0; border-bottom: 1px solid rgba(148, 163, 184, 0.28); font-size: var(--inv-summary-size); font-weight: 500; }
        .summary-line > span:first-child { font-size: inherit !important; color: var(--inv-text-muted) !important; }
        .tax-config { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; min-width: 0; font-size: var(--inv-tax-size); color: var(--inv-text-muted); }
        .tax-config input { border: none; text-align: right; outline: none; background: transparent; font-weight: 600; color: inherit; }
        #inv-tax-name { width: var(--inv-tax-name-width) !important; min-width: 72px; }
        #inv-tax-rate { width: var(--inv-tax-rate-width) !important; min-width: 42px; }
        .summary-line span:last-child, .summary-line input { font-variant-numeric: tabular-nums; }
        .grand-total { font-size: var(--inv-grand-total-size); font-weight: 700; display: flex; justify-content: space-between; align-items: baseline; padding-top: 0.9rem; border-top: 2px solid var(--inv-text); margin-top: 0.5rem; color: var(--inv-text); }
        .grand-total span:first-child { font-size: var(--inv-grand-total-label-size); font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--inv-text-muted); }
        .grand-total span:last-child { font-size: var(--inv-grand-total-value-size); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }

        .internal-notes { border: 1px solid #E5E7EB; background: #FEFCE8; padding: 1rem; border-radius: 8px; margin-top: 2rem; }
        .internal-notes label { display: block; font-size: 0.7rem; font-weight: 700; color: #854D0E; text-transform: uppercase; margin-bottom: 0.5rem;}

        .signature-section { margin-top: 2rem; display: flex; flex-direction: column; align-items: flex-start; gap: 0.55rem; }
        .signature-actions { display: flex; justify-content: flex-start; gap: 8px; flex-wrap: wrap; }
        .signature-action-btn, .signature-upload-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 0 14px; border: 1px solid rgba(203, 213, 225, 0.92); border-radius: 999px; background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(241,245,249,0.92) 100%); color: #334155; font-size: 0.72rem; font-weight: 700; cursor: pointer; box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255,255,255,0.84); transition: 0.18s ease; }
        .signature-action-btn:hover, .signature-upload-btn:hover { transform: translateY(-1px); border-color: rgba(148, 163, 184, 0.84); color: #0F172A; }
        .signature-action-btn.is-active { border-color: rgba(147, 197, 253, 0.88); background: linear-gradient(180deg, rgba(239,246,255,0.98) 0%, rgba(219,234,254,0.92) 100%); color: #1D4ED8; box-shadow: 0 10px 22px rgba(37, 99, 235, 0.08), inset 0 1px 0 rgba(255,255,255,0.78); }
        .signature-upload-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
        .signature-section.is-empty-display { display: none; }
        .signature-pad { margin-top: 0.9rem; width: min(100%, 360px); display: flex; flex-direction: column; gap: 0.55rem; position: relative; z-index: 2; }
        .signature-pad.has-stickers { z-index: 3; }
        .signature-pad-stage { position: relative; width: 100%; height: 132px; border: 1px solid #CBD5E1; border-radius: 16px 16px 10px 10px; background: #FFFFFF; overflow: hidden; }
        #invoice-app:not(.not-draft) .signature-pad-stage { cursor: crosshair; }
        .signature-pad-guide { position: absolute; inset: 0; pointer-events: none; background:
            linear-gradient(180deg, rgba(226, 232, 240, 0.55) 0%, rgba(255, 255, 255, 0.22) 100%),
            repeating-linear-gradient(135deg, rgba(148, 163, 184, 0.14) 0 12px, rgba(255, 255, 255, 0.12) 12px 24px);
            opacity: 1;
            transition: opacity 0.18s ease;
        }
        .signature-pad.has-signature .signature-pad-guide,
        .signature-pad-stage.has-ink .signature-pad-guide,
        .mobile-signature-pad.has-ink .signature-pad-guide { opacity: 0; }
        .signature-pad canvas,
        .mobile-signature-pad canvas,
        #print-sig-img { width: 100%; height: 100%; display: block; position: absolute; inset: 0; z-index: 2; background: transparent; touch-action: none; }
        .signature-pad-footer { display: flex; flex-direction: column; gap: 0.35rem; }
        .signature-pad-line { display: block; width: 100%; height: 1px; background: #0F172A; opacity: 0.88; }
        .signature-pad-auth { font-size: 0.67rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #475569; }
        .invoice-container.not-draft .signature-pad.is-empty-signature:not(.has-stickers) { display: none; }
        .signature-sticker-layer { position: absolute; inset: 0; z-index: 6; pointer-events: none; overflow: hidden; }
        .signature-sticker-layer.is-empty-print:empty { display: none; }
        .signature-sticker { position: absolute; pointer-events: auto; transform-origin: center center; touch-action: none; cursor: grab; user-select: none; -webkit-user-drag: none; }
        .signature-sticker img { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; user-select: none; -webkit-user-drag: none; filter: drop-shadow(0 8px 16px rgba(15, 23, 42, 0.14)); }
        .signature-sticker.is-selected { outline: 1px solid rgba(37, 99, 235, 0.72); outline-offset: 5px; border-radius: 12px; }
        .signature-sticker-delete,
        .signature-sticker-rotate,
        .signature-sticker-edge { opacity: 0; pointer-events: none; }
        .signature-sticker.is-selected .signature-sticker-delete,
        .signature-sticker.is-selected .signature-sticker-rotate,
        .signature-sticker.is-selected .signature-sticker-edge { opacity: 1; pointer-events: auto; }
        .signature-sticker-delete { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border: 1px solid rgba(255,255,255,0.18); border-radius: 999px; background: linear-gradient(180deg, rgba(31,41,55,0.96) 0%, rgba(17,24,39,0.94) 100%); color: #FFFFFF; font-size: 0.78rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18), inset 0 1px 0 rgba(255,255,255,0.1); z-index: 3; transition: 0.18s ease; }
        .signature-sticker-delete:hover { background: linear-gradient(180deg, rgba(220,38,38,0.96) 0%, rgba(185,28,28,0.94) 100%); transform: translateY(-1px); }
        .signature-sticker-rotate { position: absolute; top: -24px; left: 50%; transform: translateX(-50%); width: 24px; height: 24px; border: 1px solid rgba(203, 213, 225, 0.92); border-radius: 999px; background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(241,245,249,0.92) 100%); color: #0F172A; font-size: 0.8rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center; cursor: grab; box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255,255,255,0.84); z-index: 3; transition: 0.18s ease; }
        .signature-sticker-rotate:hover { transform: translateX(-50%) translateY(-1px); border-color: rgba(148, 163, 184, 0.84); }
        .signature-sticker-edge { position: absolute; z-index: 2; }
        .signature-sticker-edge.edge-n,
        .signature-sticker-edge.edge-s { left: 10px; right: 10px; height: 10px; cursor: ns-resize; }
        .signature-sticker-edge.edge-n { top: -5px; border-top: 2px solid rgba(37, 99, 235, 0.45); }
        .signature-sticker-edge.edge-s { bottom: -5px; border-bottom: 2px solid rgba(37, 99, 235, 0.45); }
        .signature-sticker-edge.edge-e,
        .signature-sticker-edge.edge-w { top: 10px; bottom: 10px; width: 10px; cursor: ew-resize; }
        .signature-sticker-edge.edge-e { right: -5px; border-right: 2px solid rgba(37, 99, 235, 0.45); }
        .signature-sticker-edge.edge-w { left: -5px; border-left: 2px solid rgba(37, 99, 235, 0.45); }
        .signature-sticker-layer.is-readonly .signature-sticker { cursor: default; }
        .signature-sticker-layer.is-readonly .signature-sticker-delete,
        .signature-sticker-layer.is-readonly .signature-sticker-rotate,
        .signature-sticker-layer.is-readonly .signature-sticker-edge { display: none; }
        .mobile-signature-pad { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 0.55rem; }
        .mobile-sig-stage { flex: 1; min-height: 0; }
        #mobile-sig-modal { padding: 0; align-items: stretch; justify-content: stretch; }
        #mobile-sig-modal .mobile-sig-workspace { position: relative; width: 100vw !important; max-width: none !important; height: 100dvh !important; max-height: none !important; display: block !important; margin: 0 !important; padding: 0 !important; border-radius: 0 !important; overflow: hidden; }
        #mobile-sig-modal .mobile-sig-close { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 12px); right: calc(env(safe-area-inset-right, 0px) + 12px); z-index: 12; width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: rgba(15, 23, 42, 0.72); color: #FFFFFF; backdrop-filter: blur(12px); }
        #mobile-sig-modal .mobile-sig-title,
        #mobile-sig-modal .sig-rotate-hint,
        #mobile-sig-modal .signature-pad-footer { display: none !important; }
        #mobile-sig-modal .mobile-signature-pad { position: absolute; inset: calc(env(safe-area-inset-top, 0px) + 0.55rem) calc(env(safe-area-inset-right, 0px) + 0.42rem) calc(env(safe-area-inset-bottom, 0px) + 4.4rem) calc(env(safe-area-inset-left, 0px) + 0.42rem); gap: 0; }
        #mobile-sig-modal .mobile-sig-stage { min-height: 0; width: 100%; height: 100%; border-radius: 16px; }
        #mobile-sig-modal .mobile-sig-actions { position: absolute; left: calc(env(safe-area-inset-left, 0px) + 0.42rem); right: calc(env(safe-area-inset-right, 0px) + 0.42rem); bottom: calc(env(safe-area-inset-bottom, 0px) + 0.5rem); z-index: 8; display: flex; gap: 0.55rem !important; margin-top: 0 !important; }
        #mobile-sig-modal .mobile-sig-actions button { min-height: 42px; padding: 0.68rem 0.8rem !important; font-size: 0.8rem; }
        #mobile-sig-modal .mobile-sig-action-label { display: inline-block; }

        .watermark { width: 100%; margin-top: 2rem; padding-top: 0.8rem; border-top: 1px solid rgba(226, 232, 240, 0.85); color: #D1D5DB; text-align: center; }
        .btn-remove-watermark { display: inline-flex; align-items: center; justify-content: center; min-height: 30px; background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(241,245,249,0.92) 100%); border: 1px solid rgba(203, 213, 225, 0.88); color: #475569; font-size: 0.7rem; padding: 0.3rem 0.72rem; border-radius: 999px; cursor: pointer; font-weight: 700; box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255,255,255,0.84); transition: 0.18s ease; }
        .btn-remove-watermark:hover { transform: translateY(-1px); color: #0F172A; border-color: rgba(148, 163, 184, 0.82); }
        .watermark.is-unlocked { display: none !important; }

        .watermark-upgrade-content { max-width: 640px; }
        .watermark-upgrade-content h3 { margin: 0 2rem 0.55rem 0; color: #111827; font-size: 1.35rem; }
        .watermark-upgrade-intro { margin: 0 0 1.25rem; color: #4B5563; line-height: 1.55; }
        .watermark-upgrade-merchant, .watermark-upgrade-privacy { margin: 1rem 0 0; color: #6B7280; font-size: 0.78rem; line-height: 1.5; }
        .watermark-upgrade-privacy { margin-top: 0.4rem; }
        .watermark-upgrade-content form { display: grid; gap: 0.75rem; }
        .watermark-upgrade-content form label { color: #374151; font-size: 0.85rem; font-weight: 700; }
        .watermark-upgrade-content form input { min-height: 44px; }
        .watermark-upgrade-content button:focus-visible { outline: 3px solid rgba(37, 99, 235, 0.28); outline-offset: 2px; }
        .watermark-primary, .watermark-secondary { min-height: 42px; border-radius: 8px; padding: 0.65rem 0.9rem; font-weight: 750; cursor: pointer; }
        .watermark-primary { border: 1px solid #1D4ED8; background: #1D4ED8; color: #FFFFFF; }
        .watermark-primary:hover { background: #1E40AF; }
        .watermark-secondary { border: 1px solid #CBD5E1; background: #FFFFFF; color: #1F2937; }
        .watermark-secondary:hover { border-color: #94A3B8; background: #F8FAFC; }
        .watermark-primary:disabled, .watermark-secondary:disabled { cursor: not-allowed; opacity: 0.55; }
        .watermark-account-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 0.8rem; color: #475569; font-size: 0.82rem; }
        .watermark-account-row button { border: 0; background: transparent; color: #1D4ED8; cursor: pointer; font-weight: 700; }
        .watermark-offers { display: grid; gap: 0.75rem; }
        .watermark-offer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1rem; padding: 1rem; border: 1px solid #E2E8F0; border-radius: 10px; background: #FFFFFF; }
        .watermark-offer h4 { margin: 0 0 0.25rem; color: #111827; font-size: 0.98rem; }
        .watermark-offer p { margin: 0; color: #64748B; font-size: 0.82rem; line-height: 1.45; }
        .watermark-offer small { display: block; margin-top: 0.35rem; color: #0369A1; font-weight: 700; }
        .watermark-upgrade-state { padding: 1rem; border: 1px solid #E2E8F0; border-radius: 10px; color: #475569; text-align: center; }
        .watermark-upgrade-state p { margin: 0 0 0.8rem; }
        .watermark-upgrade-state.is-error { border-color: #FECACA; background: #FFF7F7; color: #991B1B; }
        .watermark-upgrade-state.is-success { border-color: #A7F3D0; background: #F0FDF4; color: #166534; }
        .watermark-upgrade-notice { margin: 0; color: #475569; font-size: 0.86rem; }

        /* SEO Section */
        .seo-section { max-width: 850px; margin: 4rem auto; padding: 3rem; background: #fff; border-radius: 16px; border: 1px solid var(--app-border); box-shadow: 0 4px 6px rgba(0,0,0,0.02); }
        .seo-section h2 { font-size: 1.5rem; margin-bottom: 1.25rem; color: #111827; }
        .faq-item { margin-bottom: 2rem; border-bottom: 1px solid #F3F4F6; padding-bottom: 1.5rem; }
        .faq-item h3 { font-size: 1.1rem; margin-bottom: 0.75rem; color: #1F2937; font-weight: 700; }
        .faq-item p { margin-bottom: 0; font-size: 0.95rem; color: #4B5563; line-height: 1.7; }
        .topic-related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
        .topic-related-card { position: relative; display: block; padding: 1.2rem 1.2rem 1.5rem; border-radius: 14px; border: 1px solid #DBEAFE; background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%); text-decoration: none; color: #0F172A; transition: 0.2s; box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04); overflow: hidden; }
        .topic-related-card::before { content: ''; position: absolute; inset: 0 auto auto 0; width: 100%; height: 4px; background: linear-gradient(90deg, #2563EB 0%, #60A5FA 100%); opacity: 0.85; }
        .topic-related-card::after { content: 'Open'; position: absolute; right: 1rem; bottom: 0.9rem; font-size: 0.76rem; font-weight: 800; color: #1D4ED8; letter-spacing: 0.01em; }
        .topic-related-card:hover { transform: translateY(-2px); border-color: #93C5FD; box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08); }
        .topic-related-card strong { display: block; font-size: 1rem; margin-bottom: 0.45rem; padding-right: 3rem; }
        .topic-related-card span { display: block; color: #475569; font-size: 0.88rem; line-height: 1.6; padding-right: 1.2rem; }

        /* Topic Pages */
        body.topic-page { background: linear-gradient(180deg, #F8FAFC 0%, #EEF2FF 22%, #F3F4F6 100%); overflow-y: auto; overflow-x: hidden; }
        .topic-nav { position: sticky; top: 0; z-index: 100; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 5%; background: rgba(255,255,255,0.86); border-bottom: 1px solid var(--app-border); backdrop-filter: blur(14px); }
        .topic-nav .logo { font-size: 1.1rem; }
        .topic-nav-links { display: flex; gap: 0.75rem; flex-wrap: wrap; justify-content: flex-end; }
        .topic-nav-links a { color: #334155; text-decoration: none; font-size: 0.9rem; font-weight: 700; padding: 0.5rem 0.8rem; border-radius: 999px; border: 1px solid transparent; transition: 0.2s; }
        .topic-nav-links a:hover { background: #EFF6FF; border-color: #BFDBFE; color: #1D4ED8; }
        .topic-language-picker { display: inline-flex; align-items: center; flex-shrink: 0; }
        .topic-language-picker select { min-width: 126px; min-height: 38px; border: 1px solid var(--app-border); border-radius: 999px; padding: 0.5rem 0.78rem; background: #fff; font-size: 0.8rem; font-weight: 700; color: #111827; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); }
        .topic-shell { max-width: 1080px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
        .topic-breadcrumbs { color: #64748B; font-size: 0.82rem; margin-bottom: 1rem; }
        .topic-breadcrumbs a { color: #475569; text-decoration: none; }
        .topic-hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr); gap: 1.25rem; align-items: stretch; margin-bottom: 1.5rem; }
        .topic-hero-main, .topic-hero-side, .topic-card, .topic-cta, .topic-faq, .topic-footer { background: #FFFFFF; border: 1px solid var(--app-border); border-radius: 20px; box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05); }
        .topic-hero-main { padding: 2.4rem; }
        .topic-hero-side { padding: 1.6rem; }
        .topic-kicker { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.75rem; border-radius: 999px; background: #DBEAFE; color: #1D4ED8; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 1rem; }
        .topic-hero h1 { font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.02; letter-spacing: -0.05em; margin-bottom: 1rem; color: #0F172A; }
        .topic-lead { color: #475569; font-size: 1.02rem; max-width: 52rem; }
        .topic-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 1.5rem; }
        .topic-actions a { text-decoration: none; border-radius: 999px; font-weight: 800; padding: 0.85rem 1.25rem; transition: 0.2s; }
        .topic-actions .primary { background: #1D4ED8; color: #FFFFFF; box-shadow: 0 10px 24px rgba(29, 78, 216, 0.18); }
        .topic-actions .primary:hover { background: #1E40AF; }
        .topic-actions .secondary { background: #FFFFFF; color: #1D4ED8; border: 1px solid #BFDBFE; }
        .topic-actions .secondary:hover { background: #EFF6FF; }
        .topic-proof-list { display: grid; gap: 0.85rem; }
        .topic-proof-item { padding: 0.95rem 1rem; border-radius: 14px; background: #F8FAFC; border: 1px solid #E2E8F0; }
        .topic-proof-item strong { display: block; font-size: 0.92rem; color: #0F172A; margin-bottom: 0.35rem; }
        .topic-proof-item span { color: #475569; font-size: 0.88rem; line-height: 1.6; display: block; }
        .topic-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin-top: 1rem; }
        .topic-card { padding: 1.5rem; }
        .topic-card h2 { font-size: 1.25rem; margin-bottom: 0.75rem; color: #0F172A; }
        .topic-card h3 { font-size: 1rem; margin: 0 0 0.55rem; color: #0F172A; }
        .topic-card p { color: #475569; font-size: 0.94rem; line-height: 1.72; margin-bottom: 0.9rem; }
        .topic-card p:last-child { margin-bottom: 0; }
        .topic-card ul, .topic-card ol { padding-left: 1.1rem; color: #334155; line-height: 1.72; }
        .topic-card li + li { margin-top: 0.45rem; }
        .topic-preview { margin: 1.2rem 0 1.5rem; }
        .topic-preview-card { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr); gap: 1rem; padding: 1.1rem; background: #FFFFFF; border: 1px solid var(--app-border); border-radius: 20px; box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05); }
        .topic-preview-paper { background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%); border: 1px solid #E2E8F0; border-radius: 18px; padding: 1.25rem; }
        .topic-preview-paper-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
        .topic-preview-paper-head strong { display: block; font-size: 1.25rem; letter-spacing: -0.04em; color: #0F172A; }
        .topic-preview-paper-head span { display: block; color: #64748B; font-size: 0.8rem; font-weight: 700; }
        .topic-preview-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.85rem; margin-bottom: 1rem; }
        .topic-preview-meta span { display: block; color: #64748B; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.68rem; font-weight: 800; margin-bottom: 0.2rem; }
        .topic-preview-meta strong { display: block; color: #0F172A; font-size: 0.88rem; line-height: 1.5; }
        .topic-preview-lines { border: 1px solid #E2E8F0; border-radius: 14px; overflow: hidden; margin-bottom: 1rem; }
        .topic-preview-line { display: grid; grid-template-columns: minmax(0, 1.7fr) 70px 90px; gap: 0.75rem; padding: 0.75rem 0.9rem; align-items: center; font-size: 0.86rem; }
        .topic-preview-line + .topic-preview-line { border-top: 1px solid #E2E8F0; }
        .topic-preview-line-head { background: #F8FAFC; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; color: #64748B; font-weight: 800; }
        .topic-preview-line span:last-child, .topic-preview-line span:nth-child(2) { text-align: right; font-variant-numeric: tabular-nums; }
        .topic-preview-totals { display: grid; gap: 0.45rem; }
        .topic-preview-total-row { display: flex; justify-content: space-between; gap: 1rem; color: #475569; font-size: 0.86rem; }
        .topic-preview-total-row strong { color: #0F172A; font-variant-numeric: tabular-nums; }
        .topic-preview-total-row.is-grand { margin-top: 0.25rem; padding-top: 0.65rem; border-top: 2px solid #0F172A; color: #0F172A; font-size: 0.98rem; font-weight: 800; }
        .topic-preview-copy { padding: 1rem 0.4rem 1rem 0.2rem; display: flex; flex-direction: column; justify-content: center; }
        .topic-preview-label { color: #1D4ED8; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.72rem; font-weight: 800; margin-bottom: 0.5rem; }
        .topic-preview-copy h2 { font-size: 1.45rem; letter-spacing: -0.04em; margin-bottom: 0.7rem; color: #0F172A; }
        .topic-preview-copy p { color: #475569; line-height: 1.72; margin-bottom: 0.85rem; }
        .topic-preview-note { margin-top: 0.25rem; color: #64748B; font-size: 0.82rem; }
        .hub-picker { margin: 1.4rem 0 1.6rem; padding: 1.2rem; background: #FFFFFF; border: 1px solid var(--app-border); border-radius: 20px; box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05); }
        .hub-picker-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-end; margin-bottom: 1rem; }
        .hub-picker-head h2 { font-size: 1.4rem; letter-spacing: -0.04em; color: #0F172A; }
        .hub-picker-head p { max-width: 36rem; color: #475569; font-size: 0.92rem; line-height: 1.7; }
        .hub-tab-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1rem; }
        .hub-tab { appearance: none; border: 1px solid #CBD5E1; background: #FFFFFF; color: #475569; border-radius: 999px; min-height: 40px; padding: 0.7rem 1rem; font-size: 0.83rem; font-weight: 800; cursor: pointer; transition: 0.18s ease; }
        .hub-tab:hover { border-color: #93C5FD; color: #1D4ED8; background: #F8FBFF; }
        .hub-tab.is-active { background: #1D4ED8; border-color: #1D4ED8; color: #FFFFFF; box-shadow: 0 10px 24px rgba(29, 78, 216, 0.16); }
        .hub-route-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
        .hub-route-card { position: relative; display: flex; flex-direction: column; gap: 0.65rem; min-height: 220px; padding: 1.15rem; border-radius: 18px; border: 1px solid #DBEAFE; background: linear-gradient(180deg, #FFFFFF 0%, #F8FBFF 100%); text-decoration: none; color: #0F172A; box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05); transition: 0.18s ease; }
        .hub-route-card:hover { transform: translateY(-2px); border-color: #60A5FA; box-shadow: 0 14px 30px rgba(37, 99, 235, 0.1); }
        .hub-route-card.is-hidden { display: none; }
        .hub-route-badge { display: inline-flex; align-items: center; align-self: flex-start; min-height: 28px; padding: 0.3rem 0.6rem; border-radius: 999px; background: #DBEAFE; color: #1D4ED8; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
        .hub-route-card strong { font-size: 1rem; line-height: 1.35; letter-spacing: -0.02em; }
        .hub-route-card p { color: #475569; font-size: 0.88rem; line-height: 1.62; margin: 0; }
        .hub-route-cta { margin-top: auto; display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.8rem; font-weight: 800; color: #1D4ED8; }
        .hub-route-cta::after { content: '→'; font-size: 0.95rem; line-height: 1; }
        .topic-callout { margin-top: 1rem; padding: 1rem 1.1rem; border-radius: 14px; background: #EEF6FF; border: 1px solid #BFDBFE; color: #1E3A8A; font-size: 0.9rem; font-weight: 600; }
        .topic-section-title { font-size: 1.55rem; letter-spacing: -0.04em; color: #0F172A; margin: 2.5rem 0 1rem; }
        .topic-cta { margin-top: 1.5rem; padding: 1.6rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
        .topic-cta-copy h2 { font-size: 1.35rem; margin-bottom: 0.55rem; color: #0F172A; }
        .topic-cta-copy p { color: #475569; max-width: 42rem; }
        .topic-cta a { text-decoration: none; white-space: nowrap; }
        .topic-cta .primary { background: #1D4ED8; color: #FFFFFF; border-radius: 999px; padding: 0.85rem 1.25rem; font-weight: 800; box-shadow: 0 10px 24px rgba(29, 78, 216, 0.18); transition: 0.2s; }
        .topic-cta .primary:hover { background: #1E40AF; }
        .topic-faq { max-width: 850px; margin: 1.5rem auto 0; padding: 1.8rem; }
        .topic-footer { margin-top: 1.5rem; padding: 1.2rem 1.5rem; color: #64748B; font-size: 0.88rem; }
        .topic-footer a { color: #1D4ED8; text-decoration: none; font-weight: 700; }
        /* Editorial reading layer: content should read like a guide, not a card wall. */
        .topic-shell > .topic-grid {
            display: block;
            max-width: 760px;
            margin: 2.3rem auto 0;
            padding: 0;
            border: 0;
            border-radius: 0;
            background: transparent;
            box-shadow: none;
        }
        .topic-shell > .topic-grid + .topic-grid { margin-top: 3rem; }
        .topic-shell > .topic-grid > .topic-card {
            padding: 0;
            border: 0;
            border-radius: 0;
            background: transparent;
            box-shadow: none;
        }
        .topic-shell > .topic-grid > .topic-card + .topic-card {
            margin-top: 2.5rem;
            padding-top: 0;
            border-top: 0;
        }
        .topic-shell > .topic-grid > .topic-card h2 {
            max-width: 44rem;
            font-size: clamp(1.55rem, 3vw, 2.25rem);
            line-height: 1.08;
            letter-spacing: -0.045em;
            margin-bottom: 0.9rem;
        }
        .topic-shell > .topic-grid > .topic-card h3 {
            font-size: 1.16rem;
            line-height: 1.35;
            letter-spacing: -0.02em;
            margin: 1.5rem 0 0.55rem;
        }
        .topic-shell > .topic-grid > .topic-card p,
        .topic-shell > .topic-grid > .topic-card li {
            font-size: 1.06rem;
            line-height: 1.82;
            color: #334155;
        }
        .topic-shell > .topic-grid > .topic-card:first-child p:first-of-type {
            font-size: clamp(1.08rem, 2vw, 1.18rem);
            line-height: 1.85;
            color: #1E293B;
        }
        .topic-shell > .topic-grid > .topic-card ul,
        .topic-shell > .topic-grid > .topic-card ol { padding-left: 1.25rem; }
        .decision-band > .topic-grid,
        .decision-band .topic-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 1rem;
            margin-top: 1rem;
            padding: 0;
            border: 0;
            border-radius: 0;
            background: transparent;
            box-shadow: none;
            max-width: none;
        }
        .decision-band .topic-grid > .topic-card {
            padding: 0.15rem 0 0.15rem 1rem;
            border: 0;
            border-left: 3px solid var(--decision-band-border, #BFDBFE);
            border-radius: 0;
            background: transparent;
            box-shadow: none;
        }
        .decision-band .topic-grid > .topic-card + .topic-card {
            margin-top: 0;
            padding-top: 0.15rem;
            border-top: 0;
        }
        .topic-related-grid {
            max-width: 920px;
            margin: 1.25rem auto 0;
            grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
            gap: 0.85rem;
        }
        .topic-related-card {
            min-height: 0;
            padding: 1rem 1.05rem 1.05rem 1.1rem;
            border-radius: 18px;
            background: rgba(255,255,255,0.88);
            box-shadow: none;
        }
        .topic-related-card::before { width: 4px; height: 100%; background: linear-gradient(180deg, #2563EB 0%, #93C5FD 100%); }
        .topic-related-card::after { content: 'Read'; right: 1rem; top: 1rem; bottom: auto; }
        .topic-related-card:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(37, 99, 235, 0.07); }
        .topic-related-card strong { padding-right: 3.2rem; }
        .decision-page { --decision-accent: #0F172A; --decision-accent-soft: #E0E7FF; --decision-line: #DBEAFE; }
        .decision-band { position: relative; margin-top: 1.4rem; }
        .decision-band:first-of-type { margin-top: 0; }
        .decision-page .topic-section-title { margin: 0 0 1rem; font-size: clamp(1.35rem, 3vw, 1.9rem); line-height: 1.08; }
        .decision-band-hero .topic-hero-main { background:
            radial-gradient(circle at top right, rgba(96, 165, 250, 0.18), transparent 38%),
            linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%); }
        .decision-band-hero .topic-hero-side { background:
            linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.98) 100%),
            #FFFFFF; }
        .decision-page .topic-kicker { background: #E0E7FF; color: #3730A3; }
        .decision-page .topic-lead { font-size: 1.03rem; line-height: 1.78; max-width: 44rem; }
        .decision-band-sample .topic-preview-card { padding: 1.25rem; background:
            linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.98) 100%),
            #FFFFFF; }
        .decision-band-sample .topic-preview-paper { box-shadow: inset 0 1px 0 rgba(255,255,255,0.92), 0 12px 32px rgba(15, 23, 42, 0.05); }
        .decision-band-sample .topic-preview-copy { padding: 0.85rem 0.45rem 0.45rem; }
        .decision-page .topic-preview-label { display: inline-flex; align-items: center; padding: 0.34rem 0.62rem; border-radius: 999px; background: #EEF2FF; color: #4338CA; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 0.85rem; }
        .decision-page .topic-preview-copy h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.1; letter-spacing: -0.04em; color: #0F172A; margin-bottom: 1rem; }
        .decision-page .topic-preview-note { margin-top: 1rem; padding: 0.95rem 1rem; border-radius: 16px; background: #F8FAFC; border: 1px solid #E2E8F0; color: #475569; font-size: 0.88rem; line-height: 1.68; }
        .decision-page .topic-preview-note a { color: #1D4ED8; font-weight: 700; text-decoration: none; }
        .decision-accent-panel { position: relative; }
        .decision-accent-panel::before { content: ''; position: absolute; inset: 0 auto auto 0; width: 100%; height: 4px; border-radius: 999px 999px 0 0; background: linear-gradient(90deg, #1D4ED8 0%, #60A5FA 100%); opacity: 0.92; }
        .decision-accent-panel > * { position: relative; z-index: 1; }
        .decision-signal-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
        .decision-signal-grid .topic-card { border-color: #E2E8F0; }
        .decision-signal-grid .topic-card h3 { font-size: 1.05rem; line-height: 1.35; }
        .decision-signal-grid-risks .topic-card { background: linear-gradient(180deg, #FFFFFF 0%, #FFF7ED 100%); border-color: #FED7AA; }
        .decision-signal-grid-fields .topic-card { background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%); }
        .decision-band-proof { padding: 1.25rem; border-radius: 22px; background:
            linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(248,250,252,0.98) 100%),
            #FFFFFF; border: 1px solid #E2E8F0; box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05); }
        .decision-signal-grid-proof .topic-card { background: linear-gradient(180deg, #FFFFFF 0%, #EFF6FF 100%); border-color: #BFDBFE; }
        .decision-checklist { grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.72fr); align-items: stretch; }
        .decision-checklist .topic-card:first-child { background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%); }
        .decision-checklist .topic-card:first-child ol { margin: 0; padding-left: 1.2rem; }
        .decision-checklist .topic-card:last-child { background: linear-gradient(180deg, #FFFFFF 0%, #EEF6FF 100%); border-color: #BFDBFE; }
        .decision-page .topic-faq { max-width: none; }
        .decision-page .topic-cta { background:
            radial-gradient(circle at top right, rgba(59, 130, 246, 0.16), transparent 34%),
            linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%); }
        .decision-page .topic-footer { background: rgba(255,255,255,0.8); border: 1px solid #E2E8F0; border-radius: 20px; box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05); }
        .not-found-page {
            --not-found-accent: #0F172A;
            --not-found-accent-soft: #DBEAFE;
            --not-found-surface: #FFFFFF;
        }
        .not-found-page .topic-nav {
            background: rgba(255,255,255,0.9);
            border-bottom-color: #CBD5E1;
        }
        .not-found-page .topic-shell > .topic-hero {
            max-width: 1120px;
        }
        .not-found-hero .topic-hero-main {
            position: relative;
            overflow: hidden;
            background:
                radial-gradient(circle at top right, rgba(96, 165, 250, 0.18), transparent 38%),
                linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
            border-color: color-mix(in srgb, var(--not-found-accent-soft) 72%, #FFFFFF);
            box-shadow: 0 18px 42px rgba(15, 23, 42, 0.07);
        }
        .not-found-hero .topic-hero-main::after {
            content: '';
            position: absolute;
            inset: auto -8% -16% auto;
            width: 220px;
            height: 220px;
            border-radius: 999px;
            background: radial-gradient(circle, rgba(96, 165, 250, 0.14), transparent 70%);
            pointer-events: none;
        }
        .not-found-page .topic-hero-side {
            background: linear-gradient(180deg, #F8FAFF 0%, #FFFFFF 100%);
            border-color: color-mix(in srgb, var(--not-found-accent-soft) 78%, #FFFFFF);
        }
        .not-found-path-card {
            margin-top: 1.4rem;
            padding: 1rem 1.05rem;
            border-radius: 16px;
            border: 1px solid color-mix(in srgb, var(--not-found-accent-soft) 70%, #BFDBFE);
            background: linear-gradient(180deg, rgba(239, 246, 255, 0.96) 0%, rgba(248, 250, 252, 0.98) 100%);
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
        }
        .not-found-path-card strong {
            display: block;
            margin-bottom: 0.45rem;
            color: var(--not-found-accent);
            font-size: 0.78rem;
            font-weight: 800;
            letter-spacing: 0.04em;
            text-transform: uppercase;
        }
        .not-found-path-card code {
            display: inline-flex;
            max-width: 100%;
            padding: 0.5rem 0.7rem;
            border-radius: 12px;
            background: var(--not-found-accent);
            color: #E2E8F0;
            font-size: 0.82rem;
            line-height: 1.5;
            overflow-wrap: anywhere;
            word-break: break-word;
        }
        .not-found-path-card p { margin: 0.8rem 0 0; color: #475569; font-size: 0.88rem; line-height: 1.68; }
        .not-found-callout { display: flex; gap: 0.45rem; align-items: flex-start; background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%); border-color: color-mix(in srgb, var(--not-found-accent-soft) 82%, #E2E8F0); }
        .not-found-callout strong { color: var(--not-found-accent); }
        .not-found-callout span { color: #334155; }
        .not-found-page .topic-cta,
        .not-found-page .topic-footer {
            background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
            border-color: color-mix(in srgb, var(--not-found-accent-soft) 82%, #E2E8F0);
            box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
        }
        .not-found-page .topic-actions .primary {
            background: linear-gradient(180deg, #1D4ED8 0%, #0F172A 100%);
            box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
        }
        .not-found-page .topic-actions .primary:hover { background: linear-gradient(180deg, #2563EB 0%, #111827 100%); }
        .legal-rail { max-width: 1080px; margin: 1rem auto 1.5rem; padding: 0 1.25rem; color: #64748B; font-size: 0.78rem; line-height: 1.6; }
        .legal-rail.is-inline { margin-top: 0.8rem; margin-bottom: 0; padding: 0; max-width: none; text-align: left; }
        .legal-rail strong { color: #334155; font-weight: 800; }
        .legal-links { display: inline-flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
        .legal-links a { color: #1D4ED8; text-decoration: none; font-weight: 700; }
        .legal-links .sep { color: #94A3B8; }
        .consent-banner { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); width: min(1280px, calc(100vw - 2rem)); background: rgba(15, 23, 42, 0.94); color: #E2E8F0; border: 1px solid rgba(148, 163, 184, 0.22); border-radius: 999px; box-shadow: 0 22px 44px rgba(15, 23, 42, 0.24); backdrop-filter: blur(14px) saturate(1.18); z-index: 1200; }
        .consent-banner[hidden] { display: none; }
        .consent-banner-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.95rem; padding: 0.72rem 0.82rem 0.72rem 1rem; }
        .consent-banner-copy { flex: 1 1 auto; min-width: 0; }
        .consent-banner-copy p { margin: 0; font-size: 0.76rem; line-height: 1.45; color: #CBD5E1; white-space: normal; overflow: visible; text-overflow: clip; }
        .consent-banner-copy a { color: #BFDBFE; font-weight: 700; text-decoration: none; }
        .consent-banner-emphasis { color: #F8FAFC; font-weight: 800; letter-spacing: -0.01em; }
        .consent-banner-actions { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 0.45rem; justify-content: flex-end; white-space: nowrap; }
        .consent-banner-btn { appearance: none; border-radius: 999px; min-height: 34px; padding: 0.58rem 0.92rem; font-size: 0.74rem; font-weight: 800; cursor: pointer; border: 1px solid rgba(148, 163, 184, 0.28); background: transparent; color: #E2E8F0; transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, color 0.18s ease; }
        .consent-banner-btn:hover,
        .consent-banner-btn:focus-visible { transform: translateY(-1px); outline: none; }
        .consent-banner-btn.primary { background: linear-gradient(180deg, #3B82F6 0%, #1D4ED8 100%); border-color: rgba(96, 165, 250, 0.92); color: #FFFFFF; box-shadow: 0 12px 24px rgba(37, 99, 235, 0.28), inset 0 1px 0 rgba(255,255,255,0.18); }
        .consent-banner-btn.primary:hover,
        .consent-banner-btn.primary:focus-visible { background: linear-gradient(180deg, #60A5FA 0%, #2563EB 100%); }
        .consent-banner-btn.secondary { background: rgba(255,255,255,0.03); color: #E2E8F0; }
        .consent-banner-btn.secondary:hover,
        .consent-banner-btn.secondary:focus-visible { border-color: rgba(191, 219, 254, 0.62); color: #F8FAFC; background: rgba(255,255,255,0.06); }

        /* Modals & CTA */
        .adjacent-probe-rail { padding: 0.42rem 0.56rem 0.48rem; display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 0.34rem; border-bottom: 1px solid var(--app-border); background: #FFFFFF; }
        .adjacent-probe-head { min-width: 0; display: flex; align-items: baseline; gap: 0.38rem; flex-wrap: wrap; }
        .adjacent-probe-kicker { font-size: 0.58rem; font-weight: 900; letter-spacing: 0.04em; text-transform: uppercase; color: #334155; white-space: nowrap; }
        .adjacent-probe-copy { display: block; margin: 0; min-width: 0; color: #64748B; font-size: 0.61rem; line-height: 1.25; }
        .adjacent-probe-list { display: flex; flex-wrap: wrap; gap: 0.28rem; overflow: visible; scrollbar-width: none; }
        .adjacent-probe-list::-webkit-scrollbar { display: none; }
        .adjacent-probe-btn { flex: 0 1 auto; appearance: none; border: 1px solid color-mix(in srgb, var(--probe-accent, #475569) 22%, #CBD5E1); background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.92) 100%); color: #0F172A; border-radius: 6px; min-height: 24px; padding: 0.12rem 0.48rem 0.12rem 0.82rem; font-size: 0.6rem; line-height: 1.16; font-weight: 700; letter-spacing: 0; cursor: pointer; position: relative; box-shadow: none; transition: 0.18s ease; white-space: normal; text-align: left; }
        .adjacent-probe-btn::before { content: ''; position: absolute; left: 0.46rem; top: 50%; width: 0.33rem; height: 0.33rem; border-radius: 999px; background: var(--probe-accent, #475569); transform: translateY(-50%); opacity: 0.9; }
        .adjacent-probe-btn:hover,
        .adjacent-probe-btn:focus-visible { transform: translateY(-1px); border-color: color-mix(in srgb, var(--probe-accent, #475569) 40%, #94A3B8); box-shadow: 0 12px 24px rgba(15, 23, 42, 0.09), inset 0 1px 0 rgba(255,255,255,0.92); outline: none; }
        .modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(17, 24, 39, 0.6); backdrop-filter: blur(4px); display: none; justify-content: center; align-items: center; z-index: 2000; }
        .modal-overlay.active { display: flex; }
        .modal-content { background: #fff; padding: 2.5rem; border-radius: 20px; width: 90%; max-width: 500px; position: relative; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); max-height: 90vh; overflow-y: auto; text-align: left;}
        .btn-close-modal { position: absolute; top: 18px; right: 18px; width: 34px; height: 34px; border: 1px solid rgba(203, 213, 225, 0.9); background: rgba(255,255,255,0.92); font-size: 1.15rem; color: #64748B; cursor: pointer; transition: 0.18s ease; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08); }
        .btn-close-modal:hover { transform: translateY(-1px); color: #0F172A; border-color: rgba(148, 163, 184, 0.84); background: rgba(255,255,255,0.98); }
        .related-doc-modal { max-width: 560px; padding: 2rem; }
        .related-doc-modal-title { margin: 0 0 0.75rem; padding-right: 2rem; font-size: 1.4rem; font-weight: 800; letter-spacing: -0.03em; color: #0F172A; }
        .related-doc-modal-copy { margin: 0 0 1rem; color: #64748B; line-height: 1.65; font-size: 0.93rem; }
        .related-doc-modal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0.8rem; }
        .related-doc-modal-option { appearance: none; width: 100%; min-height: 70px; padding: 1rem 3rem 1rem 1rem; border-radius: 18px; border: 1px solid rgba(203, 213, 225, 0.94); background: linear-gradient(180deg, rgba(255,255,255,0.99) 0%, rgba(241,245,249,0.92) 100%); color: #0F172A; text-align: left; font-size: 0.95rem; font-weight: 800; letter-spacing: -0.02em; cursor: pointer; position: relative; box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255,255,255,0.9); transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease; }
        .related-doc-modal-option::after { content: '↗'; position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); font-size: 1rem; color: #64748B; transition: transform 0.18s ease, color 0.18s ease; }
        .related-doc-modal-option:hover,
        .related-doc-modal-option:focus-visible { transform: translateY(-2px); border-color: rgba(59, 130, 246, 0.42); background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(248,250,252,0.96) 100%); box-shadow: 0 18px 34px rgba(15, 23, 42, 0.11), inset 0 1px 0 rgba(255,255,255,0.94); outline: none; }
        .related-doc-modal-option:hover::after,
        .related-doc-modal-option:focus-visible::after { transform: translate(2px, -50%); color: #1D4ED8; }
        .cta-bar { flex-shrink: 0; align-self: center; width: min(850px, calc(100% - 2rem)); margin: 0 auto 1rem; padding: 0.85rem; display: flex; justify-content: center; gap: 12px; border: 1px solid rgba(203, 213, 225, 0.72); border-radius: 28px; background: rgba(248, 250, 252, 0.86); backdrop-filter: blur(18px) saturate(1.2); z-index: 1100; box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08); }
        .btn-download,
        .btn-save-status { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0.72rem; min-width: 176px; padding: 0.94rem 2rem; border-radius: 999px; font-size: 0.97rem; font-weight: 700; letter-spacing: -0.015em; cursor: pointer; border: 1px solid rgba(255, 255, 255, 0.38); transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease, opacity 0.18s ease; }
        .btn-download { background: linear-gradient(180deg, #1F2937 0%, #111827 100%); color: #F8FAFC; box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18), inset 0 1px 0 rgba(255,255,255,0.12); }
        .btn-save-status { background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(241,245,249,0.92) 100%); color: #0F172A; border-color: rgba(203, 213, 225, 0.95); box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255,255,255,0.85); }
        .btn-download:hover,
        .btn-save-status:hover { transform: translateY(-1px); }
        .btn-download:hover { box-shadow: 0 14px 28px rgba(15, 23, 42, 0.22), inset 0 1px 0 rgba(255,255,255,0.16); }
        .btn-save-status:hover { background: linear-gradient(180deg, rgba(255,255,255,0.99) 0%, rgba(248,250,252,0.95) 100%); border-color: rgba(148, 163, 184, 0.85); box-shadow: 0 14px 28px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255,255,255,0.92); }
        .btn-download::before,
        .btn-save-status.btn-invoice-only::before { content: ""; width: 1.05rem; height: 1.05rem; flex: 0 0 1.05rem; background: currentColor; opacity: 0.95; }
        .btn-download::before {
            -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v11'/%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3Cpath d='M5 21h14'/%3E%3Cpath d='M6 18v3'/%3E%3Cpath d='M18 18v3'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v11'/%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3Cpath d='M5 21h14'/%3E%3Cpath d='M6 18v3'/%3E%3Cpath d='M18 18v3'/%3E%3C/svg%3E") center / contain no-repeat;
        }
        .btn-save-status.btn-invoice-only::before {
            -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.05' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3h8l4 4v14H5V3z'/%3E%3Cpath d='M9 3v6h6V3'/%3E%3Cpath d='M9 14h6'/%3E%3Cpath d='M9 18h4'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.05' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3h8l4 4v14H5V3z'/%3E%3Cpath d='M9 3v6h6V3'/%3E%3Cpath d='M9 14h6'/%3E%3Cpath d='M9 18h4'/%3E%3C/svg%3E") center / contain no-repeat;
        }
        .btn-save-status:disabled { background: rgba(226, 232, 240, 0.9) !important; color: #94A3B8 !important; border-color: rgba(203, 213, 225, 0.82) !important; cursor: not-allowed; box-shadow: none !important; transform: none !important; }
        button[onclick="openWaitlistModal('ai_paste_panel')"] { width: 100%; min-height: 74px; background: linear-gradient(180deg, #1F2937 0%, #111827 100%) !important; color: #F8FAFC !important; border: 1px solid rgba(15, 23, 42, 0.92) !important; border-radius: 22px !important; box-shadow: 0 16px 30px rgba(15, 23, 42, 0.18), inset 0 1px 0 rgba(255,255,255,0.12) !important; }
        button[onclick="runQuickParser()"] { width: 100%; min-height: 74px; border-radius: 22px !important; background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(241,245,249,0.92) 100%) !important; border-color: rgba(203, 213, 225, 0.92) !important; color: #0F172A !important; box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255,255,255,0.88) !important; }
        #btn-submit-waitlist,
        #mobile-sig-modal button[onclick="confirmMobileSig()"] { background: linear-gradient(180deg, #1F2937 0%, #111827 100%) !important; color: #F8FAFC !important; border: 1px solid rgba(15, 23, 42, 0.92) !important; border-radius: 18px !important; box-shadow: 0 14px 28px rgba(15, 23, 42, 0.18), inset 0 1px 0 rgba(255,255,255,0.12) !important; }
        #mobile-sig-modal button[onclick="clearMobileSig()"] { background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(241,245,249,0.92) 100%) !important; color: #0F172A !important; border: 1px solid rgba(203, 213, 225, 0.92) !important; border-radius: 18px !important; box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255,255,255,0.88) !important; }
        #btn-new-bi { background: linear-gradient(180deg, #1F2937 0%, #111827 100%) !important; color: #F8FAFC !important; border: 1px solid rgba(15, 23, 42, 0.92) !important; border-radius: 999px !important; box-shadow: 0 14px 28px rgba(15, 23, 42, 0.18), inset 0 1px 0 rgba(255,255,255,0.12) !important; }

        /* --- Fix Checkbox/Radio widths and alignments --- */
        input[type="checkbox"], input[type="radio"] { width: auto !important; display: inline-block; vertical-align: middle; margin: 0 6px 0 0; cursor: pointer; }
        .draft-only label { display: inline-flex; align-items: center; }
        
        /* --- Fix Modal form styles --- */
        .modal-content .form-group { margin-bottom: 1.25rem; }
        .modal-content .form-group label.title { display: block; font-size: 0.85rem; font-weight: 700; color: #374151; margin-bottom: 0.5rem; }
        .modal-content input:not([type="radio"]):not([type="checkbox"]), .modal-content textarea { width: 100%; padding: 0.75rem 1rem; border: 1px solid #D1D5DB !important; border-radius: 8px; background: #F9FAFB; font-size: 0.9rem; color: #111827; outline: none; transition: all 0.2s ease; font-family: 'Inter', sans-serif; }
        .modal-content input:not([type="radio"]):not([type="checkbox"]):focus, .modal-content textarea:focus { border-color: var(--app-primary) !important; box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15); background: #FFFFFF; }
        .modal-content .radio-group { display: flex; flex-direction: column; gap: 10px; margin-top: 0.5rem; background: #F9FAFB; padding: 1rem; border-radius: 8px; border: 1px solid #E5E7EB; }
        .modal-content .radio-label { font-size: 0.9rem; color: #4B5563; display: flex; align-items: center; cursor: pointer; font-weight: 500; }
        .modal-content .radio-label span { line-height: 1.5; }
        .adjacent-probe-steps { margin-bottom: 1.25rem; padding: 1rem 1.05rem; border-radius: 18px; background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%); border: 1px solid #E2E8F0; display: grid; gap: 0.72rem; }
        .adjacent-probe-steps-title { font-size: 0.92rem; font-weight: 800; color: #0F172A; letter-spacing: -0.02em; }
        .adjacent-probe-step { display: flex; align-items: flex-start; gap: 0.7rem; }
        .adjacent-probe-step-index { flex: 0 0 1.4rem; width: 1.4rem; height: 1.4rem; border-radius: 999px; background: #E2E8F0; color: #0F172A; font-size: 0.73rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; margin-top: 0.08rem; }
        .adjacent-probe-step-copy { color: #475569; font-size: 0.84rem; line-height: 1.6; }
        .sync-conflict-modal { max-width: 720px; padding: 2rem; }
        .sync-modal-head { margin-bottom: 1.2rem; }
        .sync-modal-kicker { display: inline-flex; align-items: center; margin-bottom: 0.65rem; padding: 0.35rem 0.6rem; border-radius: 999px; background: #FFF7ED; color: #C2410C; font-size: 0.73rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
        .sync-modal-head h3 { font-size: 1.45rem; letter-spacing: -0.03em; color: #0F172A; margin-bottom: 0.55rem; padding-right: 1.8rem; }
        .sync-modal-head p { color: #475569; line-height: 1.7; font-size: 0.93rem; }
        .sync-modal-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; margin-bottom: 1rem; }
        .sync-modal-stat { padding: 0.95rem 1rem; border-radius: 16px; border: 1px solid #E2E8F0; background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%); }
        .sync-modal-stat span { display: block; color: #64748B; font-size: 0.78rem; font-weight: 700; margin-bottom: 0.3rem; }
        .sync-modal-stat strong { display: block; color: #0F172A; font-size: 1.5rem; letter-spacing: -0.04em; }
        .sync-modal-diff { margin-bottom: 1rem; padding: 1rem; border-radius: 18px; background: #F8FAFC; border: 1px solid #E2E8F0; }
        .sync-modal-diff-head { margin-bottom: 0.85rem; }
        .sync-modal-diff-head h4 { font-size: 0.95rem; color: #0F172A; margin-bottom: 0.3rem; }
        .sync-modal-diff-head p { color: #64748B; font-size: 0.82rem; line-height: 1.55; }
        .sync-modal-diff-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
        .sync-modal-diff-card { padding: 0.85rem 0.9rem; border-radius: 16px; background: #FFFFFF; border: 1px solid #E2E8F0; }
        .sync-modal-diff-card span { display: block; color: #64748B; font-size: 0.75rem; font-weight: 700; margin-bottom: 0.28rem; }
        .sync-modal-diff-card strong { display: block; color: #0F172A; font-size: 1.18rem; letter-spacing: -0.03em; margin-bottom: 0.55rem; }
        .sync-modal-diff-card ul { list-style: none; display: grid; gap: 0.35rem; color: #475569; font-size: 0.78rem; line-height: 1.5; }
        .sync-modal-diff-card li { padding-left: 0.75rem; position: relative; }
        .sync-modal-diff-card li::before { content: ''; position: absolute; left: 0; top: 0.55rem; width: 0.32rem; height: 0.32rem; border-radius: 999px; background: #93C5FD; }
        .sync-modal-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.85rem; }
        .sync-modal-action { appearance: none; border: 1px solid rgba(203, 213, 225, 0.92); background: linear-gradient(180deg, rgba(255,255,255,0.99) 0%, rgba(241,245,249,0.92) 100%); border-radius: 22px; padding: 1rem 1.05rem; text-align: left; cursor: pointer; transition: 0.18s ease; min-height: 210px; display: flex; flex-direction: column; gap: 0.55rem; box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255,255,255,0.86); }
        .sync-modal-action:hover, .sync-modal-action:focus-visible { border-color: rgba(148, 163, 184, 0.84); box-shadow: 0 18px 34px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255,255,255,0.92); transform: translateY(-2px); outline: none; }
        .sync-modal-action strong { font-size: 1rem; color: #0F172A; line-height: 1.35; }
        .sync-modal-action span { color: #475569; font-size: 0.86rem; line-height: 1.65; }
        .sync-modal-action.is-recommended { border-color: rgba(15, 23, 42, 0.92); background: linear-gradient(180deg, #1F2937 0%, #111827 100%); box-shadow: 0 18px 34px rgba(15, 23, 42, 0.16), inset 0 1px 0 rgba(255,255,255,0.12); }
        .sync-modal-action.is-recommended strong,
        .sync-modal-action.is-recommended span { color: #F8FAFC; }
        .sync-modal-badge { display: inline-flex; align-items: center; align-self: flex-start; padding: 0.3rem 0.55rem; border-radius: 999px; background: #DBEAFE; color: #1D4ED8; font-size: 0.72rem; font-weight: 800; }
        .sync-modal-footer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #E5E7EB; }
        .sync-modal-footer p { color: #64748B; font-size: 0.82rem; line-height: 1.55; max-width: 40rem; }
        .sync-modal-cancel { border: 1px solid rgba(203, 213, 225, 0.92); background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(241,245,249,0.92) 100%); color: #0F172A; border-radius: 999px; padding: 0.78rem 1.1rem; font-size: 0.84rem; font-weight: 800; cursor: pointer; white-space: nowrap; box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255,255,255,0.86); transition: 0.18s ease; }
        .sync-modal-cancel:hover { transform: translateY(-1px); border-color: rgba(148, 163, 184, 0.84); box-shadow: 0 14px 28px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255,255,255,0.92); }
        .pdf-result-modal-content { max-width: 540px; }
        .pdf-result-modal-content .sync-modal-actions {
            grid-template-columns: repeat(2, minmax(0, 1fr));
            align-items: stretch;
            margin-top: 1.1rem;
        }
        .pdf-result-modal-content .sync-modal-actions button {
            width: 100%;
            min-width: 0;
            min-height: 46px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            line-height: 1.2;
            white-space: normal;
            overflow-wrap: anywhere;
        }
        .unsaved-nav-modal { max-width: 560px; padding: 2rem; }
        .unsaved-nav-head { margin-bottom: 1rem; }
        .unsaved-nav-kicker { display: inline-flex; align-items: center; margin-bottom: 0.7rem; padding: 0.35rem 0.62rem; border-radius: 999px; background: #FEF3C7; color: #92400E; font-size: 0.73rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
        .unsaved-nav-head h3 { font-size: 1.5rem; letter-spacing: -0.03em; color: #0F172A; margin-bottom: 0.5rem; padding-right: 1.8rem; }
        .unsaved-nav-head p { color: #475569; font-size: 0.94rem; line-height: 1.7; }
        .unsaved-nav-summary { margin-bottom: 1rem; padding: 1rem 1.05rem; border-radius: 18px; background: #F8FAFC; border: 1px solid #E2E8F0; }
        .unsaved-nav-summary strong { display: block; color: #0F172A; font-size: 0.95rem; line-height: 1.5; margin-bottom: 0.35rem; }
        .unsaved-nav-summary span { display: block; color: #64748B; font-size: 0.83rem; line-height: 1.6; }
        .unsaved-nav-actions { display: flex; justify-content: flex-end; gap: 0.75rem; }
        .unsaved-nav-confirm { border: 1px solid rgba(15, 23, 42, 0.92); background: linear-gradient(180deg, #1F2937 0%, #111827 100%); color: #F8FAFC; border-radius: 999px; padding: 0.82rem 1.2rem; font-size: 0.84rem; font-weight: 800; cursor: pointer; box-shadow: 0 14px 28px rgba(15, 23, 42, 0.16), inset 0 1px 0 rgba(255,255,255,0.12); transition: 0.18s ease; }
        .unsaved-nav-confirm:hover,
        .unsaved-nav-confirm:focus-visible { transform: translateY(-1px); box-shadow: 0 18px 34px rgba(15, 23, 42, 0.2), inset 0 1px 0 rgba(255,255,255,0.16); outline: none; }
        .share-review-modal { max-width: 860px; padding: 2rem; }
        .share-review-head { margin-bottom: 1.1rem; }
        .share-review-kicker { display: inline-flex; align-items: center; margin-bottom: 0.65rem; padding: 0.35rem 0.62rem; border-radius: 999px; background: #EFF6FF; color: #1D4ED8; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
        .share-review-head h3 { font-size: 1.45rem; letter-spacing: -0.04em; color: #0F172A; margin-bottom: 0.5rem; padding-right: 1.8rem; }
        .share-review-head p { color: #475569; line-height: 1.7; font-size: 0.94rem; }
        .share-review-grid { display: grid; grid-template-columns: minmax(280px, 320px) minmax(0, 1fr); gap: 1rem; align-items: start; }
        .share-review-qr-card,
        .share-review-steps { border-radius: 20px; border: 1px solid #E2E8F0; background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%); }
        .share-review-qr-card { padding: 1rem; box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06); }
        .share-review-qr-shell { width: 100%; aspect-ratio: 1; border-radius: 18px; border: 1px solid #DBEAFE; background:
            linear-gradient(145deg, rgba(239,246,255,0.96) 0%, rgba(255,255,255,0.98) 58%, rgba(248,250,252,0.96) 100%);
            display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
        .share-review-qr-canvas { width: min(100%, 224px); height: auto; display: block; background: #FFFFFF; border-radius: 12px; padding: 10px; box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08); }
        .share-review-qr-status { position: absolute; inset: auto 16px 16px; padding: 0.68rem 0.78rem; border-radius: 14px; background: rgba(255,255,255,0.94); color: #475569; font-size: 0.82rem; line-height: 1.55; border: 1px solid #E2E8F0; box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08); }
        .share-review-note { margin-top: 0.85rem; color: #0F172A; font-size: 0.85rem; line-height: 1.6; font-weight: 700; }
        .share-review-link-row { display: flex; gap: 0.6rem; align-items: stretch; margin-top: 0.85rem; }
        .share-review-link-input { flex: 1; min-width: 0; padding: 0.78rem 0.95rem !important; border: 1px solid #CBD5E1 !important; border-radius: 14px !important; background: #FFFFFF !important; color: #0F172A !important; font-size: 0.82rem !important; line-height: 1.45 !important; box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04); }
        .share-review-copy-btn { flex: 0 0 auto; min-width: 120px; }
        .share-review-subnote { margin-top: 0.7rem; color: #64748B; font-size: 0.78rem; line-height: 1.6; }
        .share-review-steps { padding: 0.9rem; display: grid; gap: 0.75rem; }
        .share-review-step { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 0.85rem; align-items: start; padding: 0.95rem 1rem; border-radius: 18px; background: #FFFFFF; border: 1px solid #E2E8F0; box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04); }
        .share-review-step-no { width: 40px; height: 40px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(180deg, #1F2937 0%, #111827 100%); color: #F8FAFC; font-size: 1rem; font-weight: 800; box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16); }
        .share-review-step strong { display: block; color: #0F172A; font-size: 0.98rem; line-height: 1.4; margin-bottom: 0.3rem; }
        .share-review-step p { margin: 0; color: #475569; font-size: 0.86rem; line-height: 1.65; }

        .ai-reminder-quickbox { background: #F3F4F6; padding: 15px; border-radius: 16px; margin-bottom: 15px; border: 1px solid #E5E7EB; }
        .ai-reminder-quicktitle { font-size: 0.8rem; font-weight: 700; color: #374151; margin-bottom: 10px; }
        .ai-reminder-primary,
        .ai-reminder-secondary { width: 100%; min-height: 46px; border-radius: 18px; border: 1px solid transparent; font-size: 0.85rem; font-weight: 700; cursor: pointer; transition: 0.18s ease; }
        .ai-reminder-primary { background: linear-gradient(180deg, #1F2937 0%, #111827 100%); color: #F8FAFC; border-color: rgba(15, 23, 42, 0.92); box-shadow: 0 14px 28px rgba(15, 23, 42, 0.18), inset 0 1px 0 rgba(255,255,255,0.12); }
        .ai-reminder-primary:hover { transform: translateY(-1px); box-shadow: 0 18px 34px rgba(15, 23, 42, 0.22), inset 0 1px 0 rgba(255,255,255,0.16); }
        .ai-reminder-secondary { background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(241,245,249,0.92) 100%); color: #0F172A; border-color: rgba(203, 213, 225, 0.92); box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255,255,255,0.86); }
        .ai-reminder-secondary:hover { transform: translateY(-1px); border-color: rgba(148, 163, 184, 0.84); box-shadow: 0 14px 28px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255,255,255,0.92); }

        /* Mobile Fixes */
        .mobile-item-label { display: none; font-size: 0.65rem; font-weight: 800; color: var(--inv-text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.35rem; }
        .mobile-item-label.is-editable { user-select: none; -webkit-user-select: none; touch-action: manipulation; }
        .sig-rotate-hint { display: none !important; }
        @media (hover: none) and (pointer: coarse) {
            .items-table > .item-grid.item-header,
            .item-grid.item-header {
                display: none !important;
                visibility: hidden !important;
                max-height: 0 !important;
                margin: 0 !important;
                padding: 0 !important;
                border: 0 !important;
                overflow: hidden !important;
                pointer-events: none !important;
            }
            .items-table > .item-grid.item-header * { display: none !important; }
            .mobile-item-label { display: block; }
            .mobile-item-hint { display: block; }
        }
        @media screen and (max-width: 1024px) {
            nav { align-items: center; padding: 0.55rem 0.9rem; }
            .sidebar { width: min(340px, calc(100vw - 40px)); position: fixed; left: calc(-1 * min(340px, calc(100vw - 40px))); top: var(--nav-height, 65px); bottom: 0; z-index: 1500; }
            .sidebar.active { transform: translateX(min(340px, calc(100vw - 40px))); box-shadow: 10px 0 30px rgba(0,0,0,0.1); }
            .mobile-history-btn { display: inline-flex !important; }
            .logo-area { width: 200px; min-height: auto; padding: 0 1rem 0 0.25rem; border-right: none; }
            .nav-controls { width: auto; flex: 1 1 auto; flex-direction: row; align-items: center; justify-content: space-between; gap: 0.9rem; padding-left: 0.4rem; }
            .app-nav-links { flex-wrap: nowrap; gap: 0.3rem; }
            .app-nav-links a { min-height: 32px; padding: 0.38rem 0.6rem; font-size: 0.76rem; }
            .nav-secondary-controls { flex: 0 1 auto; justify-content: flex-end; align-items: center; gap: 0.45rem; flex-wrap: nowrap; }
            .nav-secondary-controls > button { min-height: 32px; padding: 0.4rem 0.68rem; font-size: 0.74rem; }
            .nav-secondary-controls > div:not(#backup-reminder):not(.nav-language-picker) { gap: 5px; max-width: 132px; padding: 0.38rem 0.62rem; border-radius: 999px; background: #F8FAFC; border: 1px solid #E2E8F0; box-shadow: none; }
            .nav-secondary-controls > div:not(#backup-reminder):not(.nav-language-picker) span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
            .nav-language-picker { margin-left: 0; }
            .nav-language-picker select { min-width: 0; min-height: 32px; padding: 0.38rem 0.62rem; font-size: 0.76rem; }
            .sync-modal-diff-grid,
            .sync-modal-actions,
            .share-review-grid { grid-template-columns: 1fr; }
        }
        @media screen and (max-width: 768px) {
            nav { padding: 0.55rem 0.7rem 0.65rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem 0.6rem; }
            .logo-area { width: auto; flex: 0 0 auto; padding: 0; }
            .logo { font-size: 1.18rem; }
            .nav-controls { flex: 1 1 0; min-width: 0; gap: 0.45rem; }
            .app-nav-links { order: 2; width: 100%; gap: 0.4rem; padding-bottom: 0; }
            .app-nav-links a { min-height: 32px; padding: 0.42rem 0.72rem; font-size: 0.76rem; background: #F8FAFC; border: 1px solid #E2E8F0; }
            .nav-secondary-controls { order: 1; width: 100%; display: flex; flex-wrap: nowrap; align-items: center; justify-content: flex-start; gap: 0.45rem; overflow-x: auto; padding-bottom: 0.1rem; scrollbar-width: none; }
            .nav-secondary-controls::-webkit-scrollbar { display: none; }
            .nav-secondary-controls > * { flex: 0 0 auto; min-width: 0; }
            .nav-secondary-controls > button { width: auto; min-height: 34px; padding: 0.46rem 0.8rem; font-size: 0.78rem; }
            .nav-secondary-controls > div,
            .nav-secondary-controls > .nav-language-picker { width: auto; }
            .nav-secondary-controls > div:not(#backup-reminder):not(.nav-language-picker) { display: inline-flex; align-items: center; gap: 6px; max-width: 144px; padding: 0.46rem 0.72rem; border-radius: 999px; background: #F8FAFC; border: 1px solid #E2E8F0; box-shadow: none; }
            .nav-secondary-controls > div:not(#backup-reminder):not(.nav-language-picker) span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
            .nav-secondary-controls > #backup-reminder { padding: 0.42rem 0.68rem; min-height: 34px; border-radius: 999px; white-space: nowrap; }
            .nav-language-picker { justify-content: flex-start; }
            .nav-language-picker label { display: none; }
            .nav-language-picker select { width: auto; min-width: 96px; max-width: 120px; min-height: 34px; padding: 0.46rem 0.72rem; }
            .scroll-area { padding: 0 0.55rem 0.85rem; }
            .page-hero { margin-top: 0.45rem; padding: 0; }
            .toolbar { margin-top: 0.55rem; padding: 0.45rem 0.55rem; border-radius: 999px; gap: 0.4rem; justify-content: flex-start; align-items: center; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
            .toolbar::-webkit-scrollbar { display: none; }
            .toolbar-controls,
            .toolbar-actions { flex: 0 0 auto; gap: 0.35rem; flex-wrap: nowrap; align-items: center; }
            .control-group { flex: 0 0 auto; min-width: 0; gap: 0.28rem; }
            .control-group label { display: none; }
            .control-group select { min-height: 32px; padding: 0.4rem 0.68rem; border-radius: 999px; font-size: 0.76rem; }
            #theme-switch { max-width: 8.6rem; min-width: 8rem; }
            #currency-switch { max-width: 7.2rem; min-width: 6.8rem; }
            #theme-switch { max-width: 8.6rem; }
            #currency-switch { max-width: 6.6rem; }
            #primary-color-picker { width: 20px !important; height: 20px !important; flex: 0 0 20px; }
            .toolbar .btn-sync { min-height: 32px; padding: 0.42rem 0.72rem; font-size: 0.74rem; border-radius: 999px; white-space: nowrap; }
            .toolbar-mobile-paste { display: inline-flex; }
            .toolbar-secondary-action { display: none; }
            .smart-paste-panel { display: none; margin: 0.42rem auto 0.55rem; padding: 0; }
            .smart-paste-panel.is-mobile-open { display: block; }
            .smart-paste-panel details { padding: 0.88rem !important; border-radius: 14px !important; }
            .smart-paste-panel summary { font-size: 0.82rem !important; }
            .smart-paste-panel summary span:last-child { display: none; }
            .local-template-rail { margin-top: 0.36rem; padding: 0 0.85rem; }
            .local-template-body {
                display: flex;
                flex-wrap: wrap;
                align-items: flex-start;
                gap: 0.34rem;
                max-height: none;
                overflow: visible;
                padding-bottom: 0;
                scrollbar-width: none;
            }
            .local-template-type-row {
                display: flex;
                flex: 1 1 100%;
                width: 100%;
                flex-wrap: wrap;
                gap: 0.34rem;
                padding-bottom: 0.2rem;
                margin-right: 0;
            }
            .local-template-type-btn,
            .local-template-create,
            .local-template-card { min-height: 32px; }
            .local-template-card { max-width: 132px; padding: 0.24rem 0.58rem 0.24rem 0.82rem; }
            .local-template-title { font-size: 0.64rem; }
            .adjacent-probe-rail { padding: 0.34rem 0.56rem; }
            .adjacent-probe-btn { min-height: 26px; padding: 0.14rem 0.58rem 0.14rem 0.9rem; font-size: 0.62rem; }
            .invoice-container { padding: 1.35rem 0.9rem; margin: 0 0 0.65rem; }
            .inv-status-stamp { position: static; top: auto; right: auto; display: inline-flex; width: fit-content; margin: 0 0 0.55rem; gap: 0.4rem; }
            .inv-status-stamp label { display: none; }
            .inv-status-stamp select { min-height: 32px; padding: 0.34rem 0.7rem; font-size: 0.68rem; }
            .inv-status-stamp .btn-sync { min-height: 32px; padding: 0.34rem 0.72rem; font-size: 0.68rem; }
            .inv-header { display: grid; grid-template-columns: minmax(76px, 0.34fr) minmax(0, 1fr); align-items: start; column-gap: 0.72rem; row-gap: 0.45rem; min-height: 0; margin-bottom: 0.78rem; }
            .logo-upload-box { grid-column: 1; grid-row: 1; flex: none; width: 100%; min-width: 0; height: 54px; border-radius: 12px; font-size: 0.58rem; }
            .logo-upload-box img { padding: 0.2rem; }
            .inv-title-box { grid-column: 2; grid-row: 1; width: 100%; max-width: none; margin-left: 0; align-items: stretch; padding-top: 0; }
            .inv-title-box input.title { margin-bottom: 0.42rem; text-align: right; font-size: clamp(1.34rem, 6.1vw, 1.72rem); letter-spacing: 0.02em; }
            .meta-grid { width: 100%; margin-left: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.46rem 0.52rem; }
            .meta-grid > label:nth-child(1),
            .meta-grid > input:nth-child(2) { grid-column: 1 / -1; }
            .meta-grid > label:nth-child(1) { grid-row: 1; }
            .meta-grid > input:nth-child(2) { grid-row: 2; }
            .meta-grid > label:nth-child(3) { grid-column: 1; grid-row: 3; }
            .meta-grid > input:nth-child(4) { grid-column: 1; grid-row: 4; }
            .meta-grid > label:nth-child(5) { grid-column: 2; grid-row: 3; }
            .meta-grid > .date-input-wrapper:nth-child(6) { grid-column: 2; grid-row: 4; }
            .meta-grid label { text-align: left; font-size: 0.56rem; letter-spacing: 0.08em; text-transform: uppercase; }
            .meta-grid input,
            .meta-grid .date-input-wrapper > input { min-height: 46px !important; box-sizing: border-box; padding: 0.6rem 0.7rem; text-align: left; background: #F8FAFC; border: 1px solid #D7E0EC; border-radius: 10px; }
            #inv-number,
            #inv-date,
            #inv-due,
            #inv-to-email { height: 46px !important; min-height: 46px !important; box-sizing: border-box !important; }
            .label-actions .btn-templates,
            .label-row > .btn-templates,
            .btn-templates.draft-only { min-height: 34px; padding: 0.42rem 0.72rem; }
            input#inv-to-email,
            #inv-tax-name,
            #inv-tax-rate,
            #inv-discount,
            #inv-deposit { min-height: 46px !important; box-sizing: border-box; }
            .meta-grid input[type="date"] { justify-content: flex-start; }
            .meta-grid input[type="date"]::-webkit-datetime-edit { text-align: left; }
            .address-grid { grid-template-columns: 1fr; gap: 0.95rem; margin-top: 0.7rem; margin-bottom: 1rem; }
            .bottom-grid { grid-template-columns: 1fr; gap: 1.15rem; margin-top: 0.95rem; }
            .items-table { margin-bottom: 1rem; }
            .signature-section { margin-top: 1rem; }
            .cta-bar { width: calc(100% - 0.2rem); margin-bottom: 0.45rem; padding: 0.46rem 0.58rem; gap: 0.42rem; flex-wrap: wrap; border-radius: 20px; }
            .mobile-preview-note { display: block; width: 100%; }
            .cta-bar .mobile-preview-note { font-size: 0.7rem; line-height: 1.28; }
            .mobile-item-hint { display: block; }
            .cta-bar .btn-download,
            .cta-bar .btn-save-status { flex: 1 1 calc(50% - 0.25rem); min-width: 0; min-height: 46px; padding: 0.62rem 0.72rem; font-size: 0.84rem; }
            .topic-nav { padding: 0.9rem 1rem; }
            .topic-hero { grid-template-columns: 1fr; }
            .topic-preview-card { grid-template-columns: 1fr; }
            .hub-picker-head { flex-direction: column; align-items: flex-start; }
            .hub-picker { padding: 1rem; }
            .hub-route-card { min-height: 0; }
            .topic-hero-main, .topic-hero-side, .topic-card, .topic-faq, .topic-cta, .topic-footer { border-radius: 16px; }
            .topic-hero-main { padding: 1.6rem; }
            .topic-hero-side, .topic-card, .topic-faq, .topic-footer { padding: 1.25rem; }
            .topic-preview-copy { padding: 0.25rem; }
            .topic-cta { flex-direction: column; align-items: flex-start; }
            .decision-band-proof { padding: 1rem; border-radius: 18px; }
            .decision-page .topic-preview-copy h2 { font-size: 1.55rem; }
            .decision-route-grid .topic-related-card { min-height: 0; }
            .decision-checklist { grid-template-columns: 1fr; }
            .not-found-callout { flex-direction: column; }
            .consent-banner { border-radius: 22px; }
            .consent-banner-inner { flex-wrap: wrap; align-items: center; padding: 0.78rem 0.8rem 0.82rem; }
            .consent-banner-copy { flex-basis: 100%; }
            .consent-banner-copy p { white-space: normal; overflow: visible; text-overflow: clip; font-size: 0.75rem; }
            .consent-banner-actions { width: 100%; justify-content: flex-end; }
            .consent-banner-btn { width: auto; flex: 0 0 auto; }
            .sync-conflict-modal { padding: 1.25rem; }
            .sync-modal-stats { grid-template-columns: 1fr; }
            .sync-modal-footer { flex-direction: column; align-items: stretch; }
            .sync-modal-cancel { width: 100%; }
            .pdf-result-modal-content { padding: 1.35rem; }
            .pdf-result-modal-content .sync-modal-actions { grid-template-columns: 1fr; gap: 0.65rem; }
            .unsaved-nav-modal { padding: 1.2rem; }
            .unsaved-nav-actions { flex-direction: column-reverse; }
            .unsaved-nav-confirm { width: 100%; }
            .share-review-modal { padding: 1.2rem; }
            .share-review-link-row { flex-direction: column; }
            .share-review-copy-btn { width: 100%; }
            .share-review-step { grid-template-columns: 34px minmax(0, 1fr); padding: 0.9rem; }
            .share-review-step-no { width: 34px; height: 34px; font-size: 0.92rem; }
            #invoice-app:not(.not-draft) .signature-pad { width: 100%; max-width: none; }
            #invoice-app:not(.not-draft) .signature-pad-stage { cursor: pointer; }
            .signature-action-btn { min-height: 44px; padding: 0.62rem 0.82rem; }
            .items-table > .item-grid.item-header,
            .item-header {
                display: none !important;
                visibility: hidden !important;
                max-height: 0 !important;
                margin: 0 !important;
                padding: 0 !important;
                border: 0 !important;
                overflow: hidden !important;
                pointer-events: none !important;
            }
            .items-table > .item-grid.item-header * { display: none !important; }
            .mobile-item-label { display: block; }
            .item-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.72rem; background: #fff; padding: 0.88rem; border-radius: 14px; border: 1px solid var(--app-border); margin-bottom: 0.88rem; position: relative; box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04); }
            .item-row > :first-child,
            .item-row > .amount-cell { grid-column: 1 / -1; }
            .item-row > .item-field[data-header-key="qty"],
            .item-row > .item-field[data-header-key="rate"] {
                display: grid;
                grid-template-columns: auto minmax(0, 1fr);
                align-items: center;
                gap: 0.52rem;
            }
            .item-row > .item-field[data-header-key="qty"] .mobile-item-label,
            .item-row > .item-field[data-header-key="rate"] .mobile-item-label {
                margin-bottom: 0;
                white-space: nowrap;
                line-height: 1;
            }
            .item-row textarea,
            .item-row input { width: 100%; min-height: 44px; display: block; background: #F8FAFC; padding: 0.62rem 0.72rem; border: 1px solid #D7E0EC; border-radius: 10px; margin-right: 0; }
            .item-row textarea { min-height: 3.35rem; }
            .item-row .amount-cell { display: grid; gap: 0.25rem; text-align: right; margin-top: 0.05rem; color: var(--inv-primary); font-size: 1rem; padding-top: 0.68rem; border-top: 1px solid rgba(203, 213, 225, 0.74); justify-items: stretch; }
            .item-row .amount-cell .mobile-item-label { margin-bottom: 0; }
            .item-row .amount-value { display: block; text-align: right; font-size: 1rem; font-weight: 800; }
            .item-grid .btn-remove { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; opacity: 1; background: rgba(255,255,255,0.98); border-radius: 999px; padding: 0; }
        }
        #mobile-sig-modal.mobile-sig-force-landscape .mobile-signature-pad {
            inset: auto;
            left: 50%;
            top: 50%;
            width: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 1rem);
            height: calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px) - 8rem);
            transform: translate(-50%, -50%) rotate(90deg);
            transform-origin: center center;
        }
        #mobile-sig-modal.mobile-sig-force-landscape .mobile-sig-close {
            top: auto;
            right: calc(env(safe-area-inset-right, 0px) + 0.28rem);
            bottom: calc(env(safe-area-inset-bottom, 0px) + 0.28rem);
            left: auto;
            transform: none;
            width: 40px;
            height: 40px;
        }
        #mobile-sig-modal.mobile-sig-force-landscape .mobile-sig-actions {
            top: auto;
            right: auto;
            bottom: calc(env(safe-area-inset-bottom, 0px) + 0.28rem);
            left: calc(env(safe-area-inset-left, 0px) + 0.28rem);
            width: 3.55rem;
            flex-direction: column;
            justify-content: flex-end;
            align-items: stretch;
            gap: 0.42rem !important;
            transform: none;
            transform-origin: center center;
        }
        #mobile-sig-modal.mobile-sig-force-landscape .mobile-sig-actions button {
            flex: 0 0 auto;
            width: 100%;
            min-height: 104px;
            padding: 0.38rem 0.24rem !important;
            font-size: 0.72rem;
            line-height: 1.15;
            white-space: normal;
            display: grid;
            place-items: center;
            border-radius: 16px;
        }
        #mobile-sig-modal.mobile-sig-force-landscape .mobile-sig-action-label {
            transform: rotate(90deg);
            transform-origin: center center;
            white-space: nowrap;
            font-size: 0.8rem;
            line-height: 1;
            letter-spacing: 0.01em;
        }
        @media print {
            nav, .sidebar, .toolbar, .local-template-rail, .cta-bar, .btn-add, .btn-remove, .btn-remove-logo, .btn-remove-watermark, 
            .seo-section, .modal-overlay, #logo-hint, #logo-input, .date-presets-popover, .btn-templates, .inv-status-stamp, .internal-notes,
            details, .draft-only { display: none !important; }
            .signature-section.draft-only { display: block !important; visibility: hidden !important; pointer-events: none !important; }
            body { overflow: visible !important; background: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; margin: 0; }
            @page { size: A4 portrait; margin: 8mm 12mm; }
            .app-layout, .main-content, .scroll-area { display: block !important; height: auto !important; overflow: visible !important; padding: 0 !important; margin: 0 !important; }
            .scroll-area > *:not(#invoice-app) { display: none !important; }
            .scroll-area > #invoice-app { display: block !important; width: 186mm !important; min-width: 186mm !important; max-width: 186mm !important; margin: 0 auto !important; }
            .invoice-container { --inv-print-page-width: 186mm; --inv-print-page-height: 280.5mm; --inv-print-footer-inline: 2.7rem; --inv-print-footer-reserve: 12mm; box-shadow: none !important; margin: 0 auto !important; max-width: var(--inv-print-page-width) !important; width: var(--inv-print-page-width) !important; min-width: var(--inv-print-page-width) !important; min-height: var(--inv-print-page-height) !important; box-sizing: border-box !important; display: flex !important; flex-direction: column !important; padding: 2.45rem 2.7rem calc(2.2rem + var(--inv-print-footer-reserve)) !important; border: none !important; border-radius: var(--inv-radius) !important; background: var(--inv-bg) !important; }
            .invoice-container:not(.has-due-date) .meta-grid > label:nth-child(5),
            .invoice-container:not(.has-due-date) .meta-grid > .date-input-wrapper:nth-child(6),
            .invoice-container:not(.has-due-date) .meta-grid > input:nth-child(6) { display: none !important; }
            .invoice-container.theme-compact { --inv-print-footer-inline: 2rem; --inv-print-footer-reserve: 12mm; padding: 2.1rem 2rem calc(1.8rem + var(--inv-print-footer-reserve)) !important; }
            .theme-compact .inv-header { margin-bottom: 1.45rem !important; }
            .theme-compact .address-grid { margin-top: 1.2rem !important; margin-bottom: 1.35rem !important; gap: 1.55rem !important; }
            .theme-compact .bottom-grid { grid-template-columns: minmax(0, 1fr) 250px !important; gap: 1.45rem !important; margin-top: 1rem !important; }
            .theme-compact .signature-section { margin-top: 1rem !important; }
            .invoice-container.theme-dense { --inv-print-footer-inline: 1.55rem; --inv-print-footer-reserve: 10mm; padding: 1.6rem 1.55rem calc(1.3rem + var(--inv-print-footer-reserve)) !important; }
            .theme-dense .inv-header { margin-bottom: 1rem !important; }
            .theme-dense .address-grid { margin-top: 0.9rem !important; margin-bottom: 1rem !important; gap: 1rem !important; }
            .theme-dense .bottom-grid { grid-template-columns: minmax(0, 1fr) 220px !important; gap: 1rem !important; margin-top: 0.72rem !important; }
            .theme-dense .signature-section { margin-top: 0.75rem !important; }
            .inv-header { display: flex !important; flex-direction: row !important; justify-content: space-between !important; align-items: flex-start !important; gap: var(--inv-header-gap) !important; min-height: 92px !important; margin-bottom: 1.65rem !important; }
            .logo-upload-box { grid-column: auto !important; grid-row: auto !important; order: 0 !important; flex: 0 0 160px !important; width: 160px !important; height: 80px !important; border-radius: 4px !important; font-size: 0.75rem !important; }
            .logo-upload-box img { padding: 0 !important; }
            .inv-title-box { grid-column: auto !important; grid-row: auto !important; order: 0 !important; flex: 1 1 var(--inv-title-column-min) !important; width: auto !important; max-width: min(100%, var(--inv-title-column-max)) !important; margin-left: auto !important; align-items: flex-end !important; padding-top: 0.15rem !important; }
            .inv-title-box input.title { text-align: right !important; font-size: var(--inv-title-size) !important; margin-bottom: 0.55rem !important; }
            .address-grid { margin-top: 1.4rem !important; margin-bottom: 1.55rem !important; gap: 2.1rem !important; }
            .bottom-grid { margin-top: 1rem !important; gap: 1.7rem !important; grid-template-columns: minmax(0, 1fr) 300px !important; }
            .items-table { margin-bottom: 1.05rem !important; }
            .item-header { margin-bottom: var(--inv-item-header-margin-bottom) !important; padding: var(--inv-item-header-padding) !important; border-top: var(--inv-item-header-border-top) !important; border-right: var(--inv-item-header-border-right) !important; border-bottom: var(--inv-item-header-border-bottom) !important; border-left: var(--inv-item-header-border-left) !important; border-radius: var(--inv-item-header-radius) !important; background: var(--inv-item-header-bg) !important; box-shadow: var(--inv-item-header-shadow) !important; color: var(--inv-item-header-color) !important; opacity: var(--inv-item-header-opacity) !important; }
            .item-row { margin-bottom: 0.35rem !important; }
            .signature-section { margin-top: 1.2rem !important; }
            .watermark { position: absolute !important; left: 50% !important; bottom: 0 !important; transform: translateX(-50%) !important; margin-top: 0 !important; padding: 0.55rem 0.95rem 0 !important; border-top: var(--inv-footer-rule-width) var(--inv-footer-rule-style) var(--inv-footer-rule-color) !important; break-inside: avoid !important; page-break-inside: avoid !important; display: inline-flex !important; justify-content: center !important; align-items: baseline !important; gap: 0.34rem !important; flex-wrap: nowrap !important; white-space: nowrap !important; text-align: center !important; font-size: 0.62rem !important; line-height: 1.35 !important; color: var(--inv-footer-label-color) !important; }
            .watermark span { font-family: var(--inv-footer-label-font) !important; text-transform: var(--inv-footer-label-transform) !important; letter-spacing: var(--inv-footer-label-spacing) !important; font-weight: var(--inv-footer-label-weight) !important; color: var(--inv-footer-label-color) !important; }
            .watermark strong { font-family: var(--inv-footer-brand-font) !important; font-style: var(--inv-footer-brand-style) !important; font-weight: var(--inv-footer-brand-weight) !important; letter-spacing: var(--inv-footer-brand-spacing) !important; color: var(--inv-footer-brand-color) !important; }
            
            /* Print Alignment for Meta Grid (Dates) */
            .meta-grid { display: grid !important; grid-template-columns: max-content max-content !important; gap: 4px 12px !important; width: max-content !important; max-width: 100% !important; margin-left: auto !important; justify-content: end !important; }
            .meta-grid label { text-align: right !important; justify-self: end !important; }
            .meta-grid input, .date-input-wrapper { border: none !important; text-align: right !important; width: auto !important; min-width: 86px !important; padding: 0 !important; justify-self: end !important; }
            .meta-grid #inv-number { min-width: 112px !important; }
            
            .meta-grid input[type="date"] { 
                -webkit-appearance: none; 
                display: flex !important; 
                justify-content: flex-end !important; 
                align-items: center !important;
                background: transparent !important;
            }
            .meta-grid input[type="date"]::-webkit-datetime-edit { 
                text-align: right !important; 
                width: 100% !important; 
                padding: 0 !important;
                display: flex !important;
                justify-content: flex-end !important;
            }
            .meta-grid input[type="date"]::-webkit-calendar-picker-indicator { display: none !important; }
            
            textarea, input { min-height: 0 !important; border: none !important; -webkit-text-fill-color: currentcolor !important; color: inherit !important; opacity: 1 !important; }
            input::placeholder,
            textarea::placeholder { color: transparent !important; opacity: 0 !important; -webkit-text-fill-color: transparent !important; }
            input::-webkit-input-placeholder,
            textarea::-webkit-input-placeholder { color: transparent !important; opacity: 0 !important; -webkit-text-fill-color: transparent !important; }
            input:placeholder-shown,
            textarea:placeholder-shown { color: transparent !important; -webkit-text-fill-color: transparent !important; }
            textarea { height: auto !important; overflow: visible !important; resize: none !important; }
            #inv-tax-name, #inv-tax-rate, #inv-discount, #inv-deposit { display: none !important; }
            #invoice-app:not(.not-draft) #display-tax-name,
            #invoice-app:not(.not-draft) #display-tax-rate,
            #invoice-app:not(.not-draft) #display-discount,
            #invoice-app:not(.not-draft) #display-deposit,
            .invoice-container.not-draft #display-tax-name,
            .invoice-container.not-draft #display-tax-rate,
            .invoice-container.not-draft #display-discount,
            .invoice-container.not-draft #display-deposit { display: inline !important; }
            .summary-line.is-empty-summary { display: none !important; }
            .item-header { display: grid !important; break-after: avoid !important; page-break-after: avoid !important; }
            .item-header input { color: var(--inv-item-header-color) !important; -webkit-text-fill-color: var(--inv-item-header-color) !important; font-size: var(--inv-item-header-size) !important; font-weight: var(--inv-item-header-weight) !important; letter-spacing: var(--inv-item-header-letter-spacing) !important; text-transform: var(--inv-item-header-transform) !important; }
            .item-header input:focus,
            .item-header input:hover { color: var(--inv-item-header-focus-color) !important; -webkit-text-fill-color: var(--inv-item-header-focus-color) !important; }
            .item-row, .bottom-grid > div, .signature-section { break-inside: avoid !important; page-break-inside: avoid !important; }
            .logo-upload-box.is-empty-print,
            .signature-sticker-layer.is-empty-print,
            .signature-pad.is-empty-signature:not(.has-stickers) { display: none !important; }
            .signature-pad-stage { border: none !important; background: transparent !important; }
            .signature-pad-guide,
            .signature-pad canvas,
            .signature-sticker-delete,
            .signature-sticker-rotate,
            .signature-sticker-edge { display: none !important; }
            .signature-sticker { outline: none !important; box-shadow: none !important; }
            .signature-sticker img { filter: none !important; }
        }
        .pdf-export-host {
            position: fixed !important;
            left: -100000px !important;
            top: 0 !important;
            width: 186mm !important;
            min-width: 186mm !important;
            max-width: 186mm !important;
            background: #fff !important;
            pointer-events: none !important;
            z-index: -1 !important;
            -webkit-print-color-adjust: exact !important;
            print-color-adjust: exact !important;
        }
        .pdf-export-host .draft-only,
        .pdf-export-host .btn-add,
        .pdf-export-host .btn-remove,
        .pdf-export-host .btn-remove-logo,
        .pdf-export-host .btn-remove-watermark,
        .pdf-export-host .inv-status-stamp,
        .pdf-export-host .internal-notes,
        .pdf-export-host details { display: none !important; }
        .pdf-export-host > #invoice-app {
            display: block !important;
            width: 186mm !important;
            min-width: 186mm !important;
            max-width: 186mm !important;
            margin: 0 auto !important;
        }
        .pdf-export-host .invoice-container {
            --inv-print-page-width: 186mm;
            --inv-print-page-height: 280.5mm;
            --inv-print-footer-inline: 2.7rem;
            --inv-print-footer-reserve: 12mm;
            box-shadow: none !important;
            margin: 0 auto !important;
            max-width: var(--inv-print-page-width) !important;
            width: var(--inv-print-page-width) !important;
            min-width: var(--inv-print-page-width) !important;
            min-height: var(--inv-print-page-height) !important;
            box-sizing: border-box !important;
            display: flex !important;
            flex-direction: column !important;
            padding: 2.45rem 2.7rem calc(2.2rem + var(--inv-print-footer-reserve)) !important;
            border: none !important;
            border-radius: var(--inv-radius) !important;
            background: var(--inv-bg) !important;
        }
        .pdf-export-host .invoice-container.theme-compact { --inv-print-footer-inline: 2rem; --inv-print-footer-reserve: 12mm; padding: 2.1rem 2rem calc(1.8rem + var(--inv-print-footer-reserve)) !important; }
        .pdf-export-host .theme-compact .inv-header { margin-bottom: 1.45rem !important; }
        .pdf-export-host .theme-compact .address-grid { margin-top: 1.2rem !important; margin-bottom: 1.35rem !important; gap: 1.55rem !important; }
        .pdf-export-host .theme-compact .bottom-grid { grid-template-columns: minmax(0, 1fr) 250px !important; gap: 1.45rem !important; margin-top: 1rem !important; }
        .pdf-export-host .theme-compact .signature-section { margin-top: 1rem !important; }
        .pdf-export-host .invoice-container.theme-dense { --inv-print-footer-inline: 1.55rem; --inv-print-footer-reserve: 10mm; padding: 1.6rem 1.55rem calc(1.3rem + var(--inv-print-footer-reserve)) !important; }
        .pdf-export-host .theme-dense .inv-header { margin-bottom: 1rem !important; }
        .pdf-export-host .theme-dense .address-grid { margin-top: 0.9rem !important; margin-bottom: 1rem !important; gap: 1rem !important; }
        .pdf-export-host .theme-dense .bottom-grid { grid-template-columns: minmax(0, 1fr) 220px !important; gap: 1rem !important; margin-top: 0.72rem !important; }
        .pdf-export-host .theme-dense .signature-section { margin-top: 0.75rem !important; }
        .pdf-export-host .inv-header { display: flex !important; flex-direction: row !important; justify-content: space-between !important; align-items: flex-start !important; gap: var(--inv-header-gap) !important; min-height: 92px !important; margin-bottom: 1.65rem !important; }
        .pdf-export-host .logo-upload-box { grid-column: auto !important; grid-row: auto !important; order: 0 !important; flex: 0 0 160px !important; width: 160px !important; height: 80px !important; border-radius: 4px !important; font-size: 0.75rem !important; }
        .pdf-export-host .logo-upload-box img { padding: 0 !important; }
        .pdf-export-host .inv-title-box { grid-column: auto !important; grid-row: auto !important; order: 0 !important; flex: 1 1 var(--inv-title-column-min) !important; width: auto !important; max-width: min(100%, var(--inv-title-column-max)) !important; margin-left: auto !important; align-items: flex-end !important; padding-top: 0.15rem !important; }
        .pdf-export-host .inv-title-box .title {
            display: block !important;
            width: 100% !important;
            max-width: 100% !important;
            min-height: 0 !important;
            padding: 0 !important;
            border: none !important;
            border-radius: 0 !important;
            background: transparent !important;
            box-shadow: none !important;
            font-size: var(--inv-title-size) !important;
            font-weight: 800 !important;
            text-align: right !important;
            text-transform: uppercase !important;
            letter-spacing: 0.04em !important;
            color: var(--inv-primary) !important;
            margin-bottom: 0.55rem !important;
            line-height: 1 !important;
            font-family: var(--inv-title-font, var(--inv-font)) !important;
            white-space: nowrap !important;
            overflow: hidden !important;
            text-overflow: ellipsis !important;
        }
        .pdf-export-host .address-grid { display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; margin-top: 1.4rem !important; margin-bottom: 1.55rem !important; gap: 2.1rem !important; }
        .pdf-export-host .bottom-grid { margin-top: 1rem !important; gap: 1.7rem !important; grid-template-columns: minmax(0, 1fr) 300px !important; }
        .pdf-export-host .items-table { margin-bottom: 1.05rem !important; }
        .pdf-export-host .item-grid {
            display: grid !important;
            grid-template-columns: 1fr 80px 100px 120px 24px !important;
            gap: 1rem !important;
            align-items: start !important;
            background: transparent !important;
            border: none !important;
            border-radius: 0 !important;
            box-shadow: none !important;
            padding: 0 !important;
        }
        .pdf-export-host .items-table > .item-grid.item-header,
        .pdf-export-host .item-grid.item-header,
        .pdf-export-host .item-header {
            display: grid !important;
            visibility: visible !important;
            max-height: none !important;
            overflow: visible !important;
            pointer-events: auto !important;
            margin-bottom: var(--inv-item-header-margin-bottom) !important;
            padding: var(--inv-item-header-padding) !important;
            border-top: var(--inv-item-header-border-top) !important;
            border-right: var(--inv-item-header-border-right) !important;
            border-bottom: var(--inv-item-header-border-bottom) !important;
            border-left: var(--inv-item-header-border-left) !important;
            border-radius: var(--inv-item-header-radius) !important;
            background: var(--inv-item-header-bg) !important;
            box-shadow: var(--inv-item-header-shadow) !important;
            color: var(--inv-item-header-color) !important;
            opacity: var(--inv-item-header-opacity) !important;
        }
        .pdf-export-host .item-row { margin-bottom: 0.35rem !important; }
        .pdf-export-host .item-row > :first-child,
        .pdf-export-host .item-row > .amount-cell,
        .pdf-export-host .item-row > .item-field[data-header-key="qty"],
        .pdf-export-host .item-row > .item-field[data-header-key="rate"] {
            grid-column: auto !important;
        }
        .pdf-export-host .item-field { display: block !important; min-width: 0 !important; }
        .pdf-export-host .mobile-item-label { display: none !important; }
        .pdf-export-host .item-row textarea,
        .pdf-export-host .item-row input {
            width: 100% !important;
            min-height: 0 !important;
            display: block !important;
            background: transparent !important;
            padding: 0 !important;
            border: none !important;
            border-radius: 0 !important;
            margin: 0 !important;
        }
        .pdf-export-host .item-row .amount-cell {
            display: flex !important;
            flex-direction: column !important;
            align-items: flex-end !important;
            gap: 0.16rem !important;
            grid-column: auto !important;
            text-align: right !important;
            margin-top: 0 !important;
            padding-top: 0.25rem !important;
            border-top: none !important;
        }
        .pdf-export-host .item-header span {
            display: block !important;
            visibility: visible !important;
            width: 100% !important;
            font-size: var(--inv-item-header-size) !important;
            font-weight: var(--inv-item-header-weight) !important;
            color: var(--inv-item-header-color) !important;
            -webkit-text-fill-color: var(--inv-item-header-color) !important;
            border: none !important;
            border-radius: 0 !important;
            padding: 0 !important;
            background: transparent !important;
            box-shadow: none !important;
            letter-spacing: var(--inv-item-header-letter-spacing) !important;
            line-height: 1.2 !important;
            text-transform: var(--inv-item-header-transform) !important;
        }
        .pdf-export-host .items-table > .item-grid.item-header *,
        .pdf-export-host .item-grid.item-header * {
            display: block !important;
            visibility: visible !important;
        }
        .pdf-export-host .item-header span.text-right { text-align: right !important; }
        .pdf-export-host .signature-section { margin-top: 1.2rem !important; }
        .pdf-export-host .watermark {
            position: absolute !important;
            left: 50% !important;
            bottom: 0 !important;
            transform: translateX(-50%) !important;
            margin-top: 0 !important;
            padding: 0.55rem 0.95rem 0 !important;
            border-top: var(--inv-footer-rule-width) var(--inv-footer-rule-style) var(--inv-footer-rule-color) !important;
            display: inline-flex !important;
            justify-content: center !important;
            align-items: baseline !important;
            gap: 0.34rem !important;
            flex-wrap: nowrap !important;
            white-space: nowrap !important;
            text-align: center !important;
            font-size: 0.62rem !important;
            line-height: 1.35 !important;
            color: var(--inv-footer-label-color) !important;
        }
        .pdf-export-host .watermark span { font-family: var(--inv-footer-label-font) !important; text-transform: var(--inv-footer-label-transform) !important; letter-spacing: var(--inv-footer-label-spacing) !important; font-weight: var(--inv-footer-label-weight) !important; color: var(--inv-footer-label-color) !important; }
        .pdf-export-host .watermark strong { font-family: var(--inv-footer-brand-font) !important; font-style: var(--inv-footer-brand-style) !important; font-weight: var(--inv-footer-brand-weight) !important; letter-spacing: var(--inv-footer-brand-spacing) !important; color: var(--inv-footer-brand-color) !important; }
        .pdf-export-host .meta-grid { display: grid !important; grid-template-columns: max-content max-content !important; gap: 4px 12px !important; width: max-content !important; max-width: 100% !important; margin-left: auto !important; justify-content: end !important; grid-auto-flow: row !important; }
        .pdf-export-host .meta-grid label { text-align: right !important; justify-self: end !important; }
        .pdf-export-host .meta-grid .pdf-meta-label { display: block !important; grid-column: 1 !important; grid-row: auto !important; align-self: baseline !important; }
        .pdf-export-host .meta-grid .pdf-meta-value { display: block !important; grid-column: 2 !important; grid-row: auto !important; align-self: baseline !important; line-height: 1.35 !important; text-align: right !important; white-space: nowrap !important; }
        .pdf-export-host .meta-grid span,
        .pdf-export-host .meta-grid input,
        .pdf-export-host .date-input-wrapper { border: none !important; text-align: right !important; width: auto !important; min-width: 86px !important; padding: 0 !important; justify-self: end !important; }
        .pdf-export-host .meta-grid #inv-number { min-width: 112px !important; }
        .pdf-export-host .meta-grid input[type="date"] {
            -webkit-appearance: none;
            display: flex !important;
            justify-content: flex-end !important;
            align-items: center !important;
            background: transparent !important;
        }
        .pdf-export-host .meta-grid input[type="date"]::-webkit-calendar-picker-indicator { display: none !important; }
        .pdf-export-host textarea,
        .pdf-export-host input { border: none !important; -webkit-text-fill-color: currentcolor !important; color: inherit !important; opacity: 1 !important; }
        .pdf-export-host input::placeholder,
        .pdf-export-host textarea::placeholder { color: transparent !important; opacity: 0 !important; -webkit-text-fill-color: transparent !important; }
        .pdf-export-host textarea { height: auto !important; overflow: visible !important; resize: none !important; }
        .pdf-export-host #inv-tax-name,
        .pdf-export-host #inv-tax-rate,
        .pdf-export-host #inv-discount,
        .pdf-export-host #inv-deposit { display: none !important; }
        .pdf-export-host #invoice-app:not(.not-draft) #display-tax-name,
        .pdf-export-host #invoice-app:not(.not-draft) #display-tax-rate,
        .pdf-export-host #invoice-app:not(.not-draft) #display-discount,
        .pdf-export-host #invoice-app:not(.not-draft) #display-deposit,
        .pdf-export-host .invoice-container.not-draft #display-tax-name,
        .pdf-export-host .invoice-container.not-draft #display-tax-rate,
        .pdf-export-host .invoice-container.not-draft #display-discount,
        .pdf-export-host .invoice-container.not-draft #display-deposit { display: inline !important; }
        .pdf-export-host .summary-line.is-empty-summary,
        .pdf-export-host .logo-upload-box.is-empty-print,
        .pdf-export-host .signature-sticker-layer.is-empty-print,
        .pdf-export-host .signature-pad.is-empty-signature:not(.has-stickers) { display: none !important; }
        .pdf-export-host .logo-upload-box.is-empty-print {
            flex: 0 0 0 !important;
            width: 0 !important;
            min-width: 0 !important;
            height: 0 !important;
            min-height: 0 !important;
            margin: 0 !important;
            padding: 0 !important;
            border: 0 !important;
            overflow: hidden !important;
        }
        .pdf-export-host .signature-pad-stage { border: none !important; background: transparent !important; }
        .pdf-export-host .signature-pad-guide,
        .pdf-export-host .signature-pad canvas,
        .pdf-export-host .signature-sticker-delete,
        .pdf-export-host .signature-sticker-rotate,
        .pdf-export-host .signature-sticker-edge { display: none !important; }
        .pdf-export-host #print-sig-img {
            display: block !important;
            max-width: 100% !important;
            max-height: 100% !important;
            object-fit: contain !important;
        }
        .pdf-export-host .signature-sticker { outline: none !important; box-shadow: none !important; }
        .pdf-export-host .signature-sticker img { filter: none !important; }
        .not-draft .draft-only { display: none !important; }
        #invoice-app:not(.not-draft) .not-draft { display: none !important; }
        .invoice-container.not-draft .summary-line.is-empty-summary { display: none !important; }
        .not-draft input:disabled, .not-draft textarea:disabled { border-bottom: none !important; cursor: default; color: var(--inv-text); opacity: 1; }
        .not-draft .inv-title-box input.title:disabled { color: var(--inv-primary) !important; -webkit-text-fill-color: var(--inv-primary) !important; }
        .toolbar select:disabled,
        .toolbar input:disabled { cursor: not-allowed; opacity: 0.55; }
        .not-draft .logo-upload-box { cursor: default; }
        
        /* Fix Date Picker Print Layout */
        @media print {
            input[type="date"]::-webkit-calendar-picker-indicator,
            input[type="date"]::-webkit-inner-spin-button { display: none !important; -webkit-appearance: none !important; }
            input[type="date"] { padding: 0 !important; margin: 0 !important; width: auto !important; min-width: 100px; }
            #print-sig-img { display: block !important; max-width: 100%; max-height: 100%; object-fit: contain; }
        }
        #print-sig-img { display: none; pointer-events: none; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
    

        .nav-language-picker { display: flex; align-items: center; gap: 8px; margin-left: 4px; }
        .nav-language-picker label { font-size: 0.75rem; font-weight: 700; color: #4B5563; }
        .nav-language-picker select { min-width: 134px; border: 1px solid var(--app-border); border-radius: 999px; padding: 0.5rem 0.8rem; background: #fff; font-size: 0.8rem; color: #111827; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); }
        body.page-hero-hidden .page-hero { display: none; }
        .mcp-connect-banner { max-width: 850px; margin: 0.85rem auto 0; padding: 0.72rem 0.82rem; display: grid; grid-template-columns: minmax(0, 1fr) max-content; gap: 0.7rem; align-items: center; background: #FFFFFF; border: 1px solid #D7E3F4; border-left: 4px solid #2563EB; border-radius: 10px; box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06); }
        .mcp-connect-copy { min-width: 0; display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: baseline; gap: 0.34rem 0.55rem; }
        .mcp-connect-kicker { width: max-content; max-width: 100%; display: inline-flex; align-items: center; min-height: 21px; padding: 0.14rem 0.5rem; border-radius: 999px; background: #EFF6FF; border: 1px solid #BFDBFE; color: #1D4ED8; font-size: 0.66rem; line-height: 1.1; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
        .mcp-connect-title { display: block; color: #0F172A; font-size: 0.9rem; line-height: 1.25; font-weight: 800; white-space: nowrap; }
        .mcp-connect-body { color: #334155; font-size: 0.8rem; line-height: 1.38; margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .mcp-connect-meta { grid-column: 2 / -1; color: #64748B; font-size: 0.72rem; line-height: 1.32; margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .mcp-connect-actions { display: flex; align-items: center; justify-content: flex-end; gap: 0.36rem; flex-wrap: nowrap; }
        .mcp-connect-btn { appearance: none; display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 0.42rem 0.68rem; border-radius: 999px; cursor: pointer; font-size: 0.74rem; font-weight: 800; letter-spacing: 0; white-space: nowrap; transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease; }
        .mcp-connect-btn.primary { background: #1D4ED8; border: 1px solid #1D4ED8; color: #FFFFFF; text-decoration: none; box-shadow: 0 8px 18px rgba(29, 78, 216, 0.18); }
        .mcp-connect-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08); }
        .mcp-connect-btn:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14), 0 10px 20px rgba(15, 23, 42, 0.1); }
        .page-hero { position: relative; max-width: 850px; margin: 0.85rem auto 0; padding: 0 1rem; }
        .page-hero-dismiss { position: absolute; top: 0.8rem; right: 1.8rem; width: 34px; height: 34px; border: 1px solid rgba(191, 219, 254, 0.92); border-radius: 999px; background: rgba(255,255,255,0.94); color: #475569; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08); transition: 0.18s ease; z-index: 2; }
        .page-hero-dismiss:hover,
        .page-hero-dismiss:focus-visible { transform: translateY(-1px); color: #0F172A; border-color: #93C5FD; box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12); outline: none; }
        .page-hero-dismiss span { font-size: 1.1rem; line-height: 1; }
        .page-hero-copy { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.85fr); gap: 1rem; background: linear-gradient(135deg, #EFF6FF 0%, #FFFFFF 55%, #F8FAFC 100%); border: 1px solid #DBEAFE; border-radius: 18px; padding: 1.25rem; box-shadow: 0 8px 24px rgba(37, 99, 235, 0.07); }
        .page-hero-copy.is-compact { grid-template-columns: 1fr; }
        .page-hero-copy.is-featured { grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.95fr); gap: 1.15rem; padding: 1.55rem; border-radius: 24px; background: linear-gradient(140deg, #DBEAFE 0%, #FFFFFF 48%, #F8FAFC 100%); box-shadow: 0 20px 48px rgba(37, 99, 235, 0.12); }
        .page-hero-kicker { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: #1D4ED8; font-weight: 800; margin-bottom: 0.65rem; }
        .page-hero h1 { font-size: clamp(1.75rem, 2.8vw, 2.5rem); line-height: 1.06; letter-spacing: -0.03em; color: #0F172A; margin-bottom: 0.75rem; }
        .page-hero-copy.is-featured h1 { font-size: clamp(2.15rem, 4vw, 3.15rem); line-height: 0.98; letter-spacing: -0.05em; max-width: 11ch; }
        .page-hero-lead { font-size: 0.98rem; color: #334155; max-width: 58ch; }
        .page-hero-copy.is-featured .page-hero-lead { font-size: 1.02rem; max-width: 60ch; }
        .page-hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }
        .page-hero-actions a { text-decoration: none; }
        .page-hero-primary, .page-hero-secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0.7rem 1rem; border-radius: 12px; font-size: 0.85rem; font-weight: 800; }
        .page-hero-primary { background: #1D4ED8; color: #fff; box-shadow: 0 10px 20px rgba(29, 78, 216, 0.18); }
        .page-hero-secondary { background: #fff; color: #0F172A; border: 1px solid #BFDBFE; }
        .page-hero-points { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1rem; }
        .page-hero-copy.is-featured .page-hero-points { margin-top: 1.1rem; }
        .page-hero-chip { display: inline-flex; align-items: center; padding: 0.45rem 0.75rem; border-radius: 999px; background: #FFFFFF; border: 1px solid #BFDBFE; color: #1E3A8A; font-size: 0.8rem; font-weight: 700; }
        .page-hero-proof { display: flex; flex-direction: column; gap: 0.75rem; }
        .page-hero-proof-item { background: rgba(255, 255, 255, 0.86); border: 1px solid #DBEAFE; border-radius: 14px; padding: 0.9rem 0.95rem; box-shadow: inset 0 1px 0 rgba(255,255,255,0.92); }
        .page-hero-copy.is-featured .page-hero-proof-item { min-height: 0; padding: 1rem 1.05rem; }
        .page-hero-proof-item strong { display: block; font-size: 0.82rem; color: #0F172A; margin-bottom: 0.3rem; }
        .page-hero-proof-item span { display: block; font-size: 0.78rem; line-height: 1.45; color: #475569; }
        .page-hero-copy.is-featured .page-hero-proof-item strong { font-size: 0.88rem; }
        .page-hero-copy.is-featured .page-hero-proof-item span { font-size: 0.82rem; line-height: 1.58; }
        .page-route-section { max-width: 850px; margin: 0.9rem auto 0; padding: 0 1rem; }
        .page-route-shell { background: #FFFFFF; border: 1px solid #DBEAFE; border-radius: 18px; padding: 1.2rem; box-shadow: 0 8px 24px rgba(37, 99, 235, 0.06); }
        .page-route-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
        .page-route-kicker { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: #1D4ED8; font-weight: 800; margin-bottom: 0.45rem; }
        .page-route-head h2 { font-size: 1.35rem; letter-spacing: -0.03em; color: #0F172A; margin-bottom: 0.45rem; }
        .page-route-head p { color: #475569; font-size: 0.92rem; line-height: 1.68; max-width: 58ch; }
        .page-route-guide { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0.7rem 1rem; border-radius: 999px; background: #EFF6FF; border: 1px solid #BFDBFE; color: #1D4ED8; text-decoration: none; font-size: 0.84rem; font-weight: 800; white-space: nowrap; }
        .page-route-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.85rem; }
        .page-route-card { display: flex; flex-direction: column; gap: 0.45rem; min-height: 180px; padding: 1rem; border-radius: 16px; background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%); border: 1px solid #DBEAFE; box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04); text-decoration: none; color: #0F172A; transition: 0.2s; }
        .page-route-card:hover { transform: translateY(-2px); border-color: #93C5FD; box-shadow: 0 12px 28px rgba(37, 99, 235, 0.08); }
        .page-route-card strong { font-size: 0.98rem; line-height: 1.35; }
        .page-route-card span { color: #475569; font-size: 0.86rem; line-height: 1.62; }
        .page-route-card em { margin-top: auto; color: #1D4ED8; font-size: 0.76rem; font-style: normal; font-weight: 800; letter-spacing: 0.02em; }
        .topic-link-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }
        .topic-link-pill { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0.65rem 0.95rem; border-radius: 999px; background: #EFF6FF; border: 1px solid #BFDBFE; color: #1D4ED8; text-decoration: none; font-size: 0.84rem; font-weight: 800; }
        .invoice-template-page .template-decision-band { margin-top: 1.4rem; }
        .invoice-template-page .template-shortcuts { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
        .invoice-template-page .template-shortcuts .decision-route-card { grid-template-columns: 1fr; align-items: start; }
        .invoice-template-page .template-format-band { margin-top: 1.4rem; }
        .invoice-template-page .hub-picker { margin-top: 1.4rem; box-shadow: 0 10px 24px rgba(15, 23, 42, 0.045); }
        .invoice-template-page .hub-route-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.72rem; }
        .invoice-template-page .hub-route-card { min-height: 0; padding: 0.95rem 1rem; border-radius: 16px; gap: 0.48rem; box-shadow: none; }
        .invoice-template-page .hub-route-card:hover { transform: translateY(-1px); box-shadow: 0 10px 20px rgba(37, 99, 235, 0.07); }
        .invoice-template-page .hub-route-badge { min-height: 24px; padding: 0.22rem 0.5rem; font-size: 0.64rem; }
        .invoice-template-page .hub-route-cta { margin-top: 0.15rem; }
        .invoice-template-page .template-article-flow { margin-top: 3rem; }
        .invoice-template-page .template-scenario-band { margin-top: 2.4rem; }
        .invoice-template-page .template-learning-index { max-width: 980px; }
        .invoice-template-page .template-learning-index .topic-link-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 0.45rem; }
        .invoice-template-page .template-learning-index .topic-link-pill { justify-content: flex-start; min-height: 34px; padding: 0.48rem 0.7rem; border-radius: 12px; background: #F8FBFF; color: #1D4ED8; font-size: 0.76rem; line-height: 1.2; }
        .template-directory { max-width: 1080px; margin: 2.6rem auto 0; padding: 1.35rem 1.45rem; border-radius: 24px; border: 1px solid #DBEAFE; background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(248,251,255,0.96) 100%); box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05); }
        .template-directory-head { max-width: 760px; margin-bottom: 1.15rem; }
        .template-directory-head h2 { font-size: clamp(1.55rem, 3vw, 2.2rem); line-height: 1.08; letter-spacing: -0.045em; color: #0F172A; margin-bottom: 0.65rem; }
        .template-directory-head p { color: #475569; line-height: 1.72; font-size: 0.95rem; }
        .template-directory-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.35rem 1.6rem; }
        .template-directory-group { min-width: 0; padding-top: 0.9rem; border-top: 1px solid #DBEAFE; }
        .template-directory-group h3 { font-size: 1rem; line-height: 1.32; color: #0F172A; letter-spacing: -0.025em; margin-bottom: 0.72rem; }
        .template-directory-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
        .template-directory-list li { display: grid; grid-template-columns: minmax(145px, 0.72fr) minmax(0, 1.28fr); gap: 0.8rem; align-items: start; padding: 0.58rem 0; border-bottom: 1px solid rgba(219, 234, 254, 0.82); }
        .template-directory-list li:last-child { border-bottom: 0; }
        .template-directory-list a { color: #1D4ED8; text-decoration: none; font-weight: 800; font-size: 0.86rem; line-height: 1.35; }
        .template-directory-list a:hover { color: #1E40AF; text-decoration: underline; text-underline-offset: 0.16em; }
        .template-directory-list span { color: #475569; font-size: 0.82rem; line-height: 1.55; }
        body.intent-template-hub { --decision-accent: #2563EB; --decision-border: #BFDBFE; }
        body.intent-template-detail { --decision-accent: #0E7490; --decision-border: #A5F3FC; }
        body.intent-help-answer { --decision-accent: #B45309; --decision-border: #FDE68A; }
        body.intent-comparison { --decision-accent: #0F766E; --decision-border: #99F6E4; }
        body.intent-guide { --decision-accent: #15803D; --decision-border: #BBF7D0; }
        body.intent-trust { --decision-accent: #4F46E5; --decision-border: #C7D2FE; }
        .topic-banner-art { position: relative; display: block; width: 100%; margin: 0 0 1rem; color: var(--banner-accent, #2563EB); border-radius: 30px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--banner-accent, #2563EB) 26%, #FFFFFF); background: #FFFFFF; box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08); isolation: isolate; }
        .topic-banner-art svg { display: block; width: 100%; height: auto; min-height: 170px; }
        .topic-banner-art::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), inset 0 -1px 0 rgba(15,23,42,0.04); pointer-events: none; }
        .topic-banner-art-side { margin-bottom: 1.05rem; }
        .topic-banner-art-inline { max-width: 560px; margin: 1.1rem 0 1rem; }
        .topic-banner-orb { fill: var(--banner-accent-2, #60A5FA); opacity: 0.16; }
        .topic-banner-orb-b { fill: var(--banner-accent, #2563EB); opacity: 0.12; }
        .topic-banner-motif rect,
        .topic-banner-motif circle,
        .topic-banner-motif path { vector-effect: non-scaling-stroke; stroke: var(--banner-accent, #2563EB); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
        .topic-banner-motif > rect,
        .topic-banner-motif > circle,
        .topic-banner-motif > path { fill: rgba(255,255,255,0.76); }
        .topic-banner-motif rect:not(:first-child) { fill: color-mix(in srgb, var(--banner-accent, #2563EB) 18%, #FFFFFF); stroke-width: 0; }
        .topic-banner-motif path:not(:first-child) { fill: none; }
        .topic-banner-motif circle { fill: color-mix(in srgb, var(--banner-accent-2, #60A5FA) 22%, #FFFFFF); }
        .topic-banner-motif text { fill: #0F172A; font: 800 12px/1.2 ui-sans-serif, system-ui, sans-serif; letter-spacing: -0.02em; text-transform: capitalize; }
        .intent-comparison .topic-banner-motif rect,
        .intent-guide .topic-banner-motif rect,
        .intent-trust .topic-banner-motif rect { fill: rgba(255,255,255,0.82); }
        .intent-help-answer .topic-banner-motif rect:not(:first-child),
        .intent-help-answer .topic-banner-motif circle { fill: #FFFBEB; }
        .intent-guide .topic-banner-motif circle { fill: #DCFCE7; }
        .intent-comparison .topic-banner-motif circle { fill: #CCFBF1; }
        .intent-trust .topic-banner-motif path:first-child { fill: #EEF2FF; }
        .topic-hero-side:has(.topic-banner-art) .topic-proof-list { margin-top: 0.25rem; }
        .hero.topic-hero .topic-banner-art-inline { align-self: stretch; }
        /* Intent layout layer: the same SEO corpus should not feel like one repeated card template. */
        .topic-content { max-width: 1080px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
        .topic-content > .hero.topic-hero { display: block; position: relative; padding: clamp(1.5rem, 4vw, 2.7rem); border-radius: 28px; border: 1px solid var(--decision-border, #DBEAFE); background:
            radial-gradient(circle at top right, color-mix(in srgb, var(--decision-accent, #2563EB) 18%, transparent), transparent 34%),
            linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.98) 100%); box-shadow: 0 18px 42px rgba(15, 23, 42, 0.07); overflow: hidden; }
        .topic-content > .hero.topic-hero::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 5px; background: linear-gradient(180deg, var(--decision-accent, #2563EB) 0%, color-mix(in srgb, var(--decision-accent, #2563EB) 10%, #FFFFFF) 100%); }
        .topic-content > .hero.topic-hero > * { position: relative; z-index: 1; }
        .topic-content .eyebrow { display: inline-flex; align-items: center; min-height: 30px; padding: 0.38rem 0.72rem; border-radius: 999px; background: color-mix(in srgb, var(--decision-accent, #2563EB) 12%, #FFFFFF); border: 1px solid color-mix(in srgb, var(--decision-accent, #2563EB) 24%, #FFFFFF); color: var(--decision-accent, #2563EB); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 0.95rem; }
        .topic-content > .hero.topic-hero h1 { max-width: 820px; font-size: clamp(2rem, 4.6vw, 3.55rem); line-height: 1.02; letter-spacing: -0.055em; color: #0F172A; margin-bottom: 1rem; }
        .topic-content .hero-copy { max-width: 700px; color: #475569; font-size: 1.04rem; line-height: 1.78; }
        .topic-content .hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 1.4rem; clear: both; }
        .topic-content .hero-actions a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0.82rem 1.18rem; border-radius: 999px; text-decoration: none; font-weight: 800; transition: 0.18s ease; }
        .topic-content .hero-actions .primary { background: var(--decision-accent, #2563EB); color: #FFFFFF; box-shadow: 0 12px 26px color-mix(in srgb, var(--decision-accent, #2563EB) 22%, transparent); }
        .topic-content .hero-actions .primary:hover { transform: translateY(-1px); filter: saturate(1.05) brightness(0.96); }
        .topic-content .hero-actions .secondary { color: var(--decision-accent, #2563EB); background: #FFFFFF; border: 1px solid color-mix(in srgb, var(--decision-accent, #2563EB) 30%, #FFFFFF); }
        .topic-content .hero-actions .secondary:hover { transform: translateY(-1px); background: color-mix(in srgb, var(--decision-accent, #2563EB) 7%, #FFFFFF); }
        .intent-template-detail .topic-content > .hero.topic-hero .topic-banner-art-inline { float: right; width: min(42%, 390px); margin: 0 0 1rem 1.45rem; }
        .intent-template-detail .topic-content > .topic-grid.two-up { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: stretch; }
        .intent-template-detail .topic-content > .topic-grid.two-up .topic-card { border-color: color-mix(in srgb, var(--decision-accent, #0E7490) 24%, #FFFFFF); background: linear-gradient(180deg, #FFFFFF 0%, color-mix(in srgb, var(--decision-accent, #0E7490) 6%, #FFFFFF) 100%); }
        .intent-template-detail .topic-content .topic-related-grid { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
        .intent-template-detail .topic-content .topic-related-card::after { content: 'Use'; color: var(--decision-accent, #0E7490); }
        .intent-help-answer .topic-content > .hero.topic-hero { max-width: 980px; margin-left: auto; margin-right: auto; background:
            radial-gradient(circle at 92% 8%, rgba(245, 158, 11, 0.16), transparent 34%),
            linear-gradient(180deg, #FFFFFF 0%, #FFFBEB 100%); }
        .intent-help-answer .topic-content > .hero.topic-hero .topic-banner-art-inline { max-width: 420px; margin: 1rem 0 0; box-shadow: 0 12px 28px rgba(180, 83, 9, 0.08); }
        .intent-help-answer .topic-content > .topic-grid.two-up { display: block; max-width: 820px; margin: 1.4rem auto 0; }
        .intent-help-answer .topic-content > .topic-grid.two-up > .topic-card { padding: 1rem 0 1rem 1.1rem; border: 0; border-left: 4px solid #FDE68A; border-radius: 0; background: transparent; box-shadow: none; }
        .intent-help-answer .topic-content > .topic-grid.two-up > .topic-card + .topic-card { margin-top: 0.65rem; }
        .intent-help-answer .topic-content .decision-band { --decision-band-bottom: #FFFBEB; --decision-band-border: #FDE68A; box-shadow: 0 10px 26px rgba(180, 83, 9, 0.06); }
        .intent-comparison .topic-content > .hero.topic-hero,
        .intent-comparison .topic-shell > .topic-hero { background:
            linear-gradient(90deg, rgba(240,253,250,0.98) 0%, rgba(255,255,255,0.98) 49%, rgba(236,253,245,0.98) 100%); }
        .intent-comparison .topic-content > .hero.topic-hero .topic-banner-art-inline { max-width: 520px; }
        .intent-comparison .topic-content .topic-related-grid,
        .intent-comparison .topic-shell .topic-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
        .intent-comparison .topic-content .topic-related-card,
        .intent-comparison .topic-shell .topic-related-card { background: linear-gradient(180deg, #FFFFFF 0%, #F0FDFA 100%); border-color: #99F6E4; }
        .intent-comparison .topic-content .topic-related-card::after,
        .intent-comparison .topic-shell .topic-related-card::after { content: 'Compare'; color: #0F766E; }
        .intent-guide .topic-content > .hero.topic-hero,
        .intent-guide .topic-shell > .topic-hero { background:
            radial-gradient(circle at 84% 14%, rgba(34, 197, 94, 0.16), transparent 34%),
            linear-gradient(180deg, #FFFFFF 0%, #F0FDF4 100%); }
        .intent-guide .topic-content > .hero.topic-hero .topic-banner-art-inline { width: min(100%, 620px); }
        .intent-guide .topic-content > .topic-grid.two-up { counter-reset: guide-step; }
        .intent-guide .topic-content > .topic-grid.two-up > .topic-card { position: relative; padding-left: 4.2rem; border-color: #BBF7D0; background: linear-gradient(180deg, #FFFFFF 0%, #F7FEF8 100%); }
        .intent-guide .topic-content > .topic-grid.two-up > .topic-card::before { counter-increment: guide-step; content: counter(guide-step, decimal-leading-zero); position: absolute; left: 1.05rem; top: 1.05rem; width: 2.25rem; height: 2.25rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: #DCFCE7; color: #15803D; font-size: 0.74rem; font-weight: 900; letter-spacing: 0.04em; }
        .intent-guide .topic-content .topic-related-card::after,
        .intent-guide .topic-shell .topic-related-card::after { content: 'Step'; color: #15803D; }
        .intent-trust .topic-content > .hero.topic-hero,
        .intent-trust .topic-shell > .topic-hero { background:
            radial-gradient(circle at 86% 10%, rgba(79, 70, 229, 0.14), transparent 36%),
            linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%); }
        .intent-trust .topic-card,
        .intent-trust .topic-faq,
        .intent-trust .topic-cta { border-color: #E2E8F0; box-shadow: none; }
        .topic-code-block { margin-top: 0.9rem; padding: 0.95rem 1rem; border-radius: 14px; background: #0F172A; color: #E2E8F0; border: 1px solid #1E293B; overflow-x: auto; }
        .topic-code-block code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; font-size: 0.8rem; line-height: 1.65; white-space: pre; }
        .topic-note { margin-top: 0.8rem; font-size: 0.84rem; color: #475569; }
        .decision-page { --decision-accent: #2563EB; --decision-accent-soft: #DBEAFE; --decision-border: #BFDBFE; --decision-text: #0F172A; --decision-muted: #475569; --decision-surface: #FFFFFF; --decision-surface-muted: #F8FAFC; --decision-shadow: 0 12px 32px rgba(15, 23, 42, 0.05); }
        body.topic-page.decision-page { background: linear-gradient(180deg, #F8FAFC 0%, #EAF2FF 16%, #F8FAFC 56%, #F1F5F9 100%); }
        .decision-page .topic-shell,
        .topic-shell.decision-page,
        .decision-page.topic-shell { max-width: 1120px; }
        .decision-page .topic-hero-main { position: relative; overflow: hidden; background: radial-gradient(circle at top right, rgba(96, 165, 250, 0.16), transparent 34%), linear-gradient(180deg, #FFFFFF 0%, #F8FBFF 100%); }
        .decision-page .topic-hero-side { background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.96) 100%); border-color: #DBEAFE; }
        .decision-page .topic-section-title { max-width: none; }
        .decision-page .topic-grid > .decision-band,
        .decision-page .topic-grid > .decision-checklist,
        .decision-page .topic-grid > .decision-proof,
        .decision-page .topic-grid > .decision-route-grid { grid-column: 1 / -1; }
        .decision-band { --decision-band-accent: var(--decision-accent, #2563EB); --decision-band-border: var(--decision-border, #BFDBFE); --decision-band-top: #FFFFFF; --decision-band-bottom: #EFF6FF; position: relative; margin-top: 1rem; padding: 1.35rem 1.4rem; border-radius: 22px; border: 1px solid var(--decision-band-border); background: linear-gradient(180deg, var(--decision-band-top) 0%, var(--decision-band-bottom) 100%); box-shadow: var(--decision-shadow, 0 12px 32px rgba(15, 23, 42, 0.05)); overflow: hidden; }
        .decision-band::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(180deg, var(--decision-band-accent) 0%, rgba(255,255,255,0.12) 100%), var(--decision-band-accent); }
        .decision-band > * { position: relative; z-index: 1; min-width: 0; }
        .decision-band-copy,
        .decision-band-side { min-width: 0; position: relative; z-index: 1; }
        .decision-band-label { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 30px; padding: 0.35rem 0.72rem; border-radius: 999px; background: rgba(255,255,255,0.72); color: var(--decision-band-accent); border: 1px solid rgba(191, 219, 254, 0.92); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 0.85rem; }
        .decision-band h2,
        .decision-band h3 { font-size: clamp(1.28rem, 2vw, 1.78rem); line-height: 1.12; letter-spacing: -0.04em; color: var(--decision-text, #0F172A); margin-bottom: 0.7rem; }
        .decision-band p { color: var(--decision-muted, #475569); font-size: 0.95rem; line-height: 1.72; margin-bottom: 0.8rem; }
        .decision-band p:last-child { margin-bottom: 0; }
        .decision-band ul { padding-left: 1.15rem; color: #334155; line-height: 1.7; }
        .decision-band ul li + li { margin-top: 0.4rem; }
        .decision-band-metrics { display: grid; gap: 0.75rem; }
        .decision-band-metric { padding: 0.95rem 1rem; border-radius: 16px; background: rgba(255,255,255,0.82); border: 1px solid rgba(191, 219, 254, 0.92); box-shadow: inset 0 1px 0 rgba(255,255,255,0.88); }
        .decision-band-metric strong { display: block; font-size: 0.92rem; color: var(--decision-text, #0F172A); margin-bottom: 0.28rem; }
        .decision-band-metric span { display: block; color: var(--decision-muted, #475569); font-size: 0.84rem; line-height: 1.6; }
        .decision-band.is-risk { --decision-band-accent: #C2410C; --decision-band-border: #FCD34D; --decision-band-bottom: #FFF7ED; }
        .decision-band.is-proof { --decision-band-accent: #0F766E; --decision-band-border: #99F6E4; --decision-band-bottom: #F0FDFA; }
        .decision-band.is-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
        .decision-signal-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0.85rem; margin-top: 1rem; }
        .decision-signal-grid > * { position: relative; grid-column: span 4; min-width: 0; padding: 1.05rem 1.1rem; border-radius: 18px; border: 1px solid #E2E8F0; background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%); box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04); overflow: hidden; }
        .decision-signal-grid > *::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--decision-accent, #2563EB) 0%, #93C5FD 100%); opacity: 0.88; }
        .decision-signal-grid > *.is-wide { grid-column: span 6; }
        .decision-signal-grid > *.is-full { grid-column: 1 / -1; }
        .decision-signal-grid > *.is-risk::before { background: linear-gradient(90deg, #F59E0B 0%, #FCD34D 100%); }
        .decision-signal-grid > *.is-proof::before { background: linear-gradient(90deg, #0F766E 0%, #5EEAD4 100%); }
        .decision-signal-grid > * > strong,
        .decision-signal-grid > * > h3 { display: block; font-size: 1rem; line-height: 1.35; letter-spacing: -0.02em; color: #0F172A; margin-bottom: 0.5rem; }
        .decision-signal-grid > * > p,
        .decision-signal-grid > * > span { display: block; color: #475569; font-size: 0.88rem; line-height: 1.64; }
        .decision-signal-grid > * > p + p { margin-top: 0.5rem; }
        .decision-signal-grid > * > em { display: inline-flex; align-items: center; min-height: 24px; margin-top: 0.7rem; color: #1D4ED8; font-size: 0.74rem; font-style: normal; font-weight: 800; letter-spacing: 0.02em; }
        .decision-checklist { counter-reset: decision-step; display: grid; grid-template-columns: 1fr; align-items: start; gap: 0.85rem; margin-top: 1rem; padding: 0; list-style: none; }
        .decision-checklist > li { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.85rem; align-items: start; padding: 1rem 1.1rem 1rem 0.95rem; border-radius: 18px; border: 1px solid #DBEAFE; background: linear-gradient(180deg, #FFFFFF 0%, #F8FBFF 100%); box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04); }
        .decision-checklist > li::before { counter-increment: decision-step; content: counter(decision-step, decimal-leading-zero); display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 999px; background: #DBEAFE; color: #1D4ED8; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.04em; }
        .decision-checklist > li strong { display: block; font-size: 0.98rem; line-height: 1.4; color: #0F172A; margin-bottom: 0.35rem; }
        .decision-checklist > li p,
        .decision-checklist > li span { display: block; color: #475569; font-size: 0.88rem; line-height: 1.66; }
        .decision-checklist > li p + p { margin-top: 0.45rem; }
        .decision-checklist.is-risk > li { border-color: #FCD34D; background: linear-gradient(180deg, #FFFFFF 0%, #FFFBEB 100%); }
        .decision-checklist.is-risk > li::before { background: #FDE68A; color: #92400E; }
        .topic-definition-box { max-width: 860px; margin: 1rem auto 0; padding: 1.15rem 1.25rem; border-radius: 18px; border: 1px solid #BFDBFE; background: linear-gradient(180deg, #FFFFFF 0%, #EFF6FF 100%); box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05); }
        .topic-definition-box strong { display: block; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #1D4ED8; margin-bottom: 0.45rem; }
        .topic-definition-box p { margin: 0; color: #334155; font-size: 0.94rem; line-height: 1.72; }
        .topic-definition-list { display: grid; gap: 0.15rem; margin-top: 1rem; }
        .topic-definition-list div { padding: 0.95rem 0 0.95rem 1rem; border-left: 3px solid #BFDBFE; background: transparent; }
        .topic-definition-list dt { margin: 0; font-size: 0.95rem; font-weight: 800; letter-spacing: -0.02em; color: #0F172A; }
        .topic-definition-list dd { margin: 0.38rem 0 0; color: #475569; font-size: 0.88rem; line-height: 1.68; }
        .topic-compare-table-wrap { margin-top: 1rem; overflow-x: auto; border-radius: 20px; border: 1px solid #E2E8F0; background: #FFFFFF; box-shadow: 0 12px 24px rgba(15, 23, 42, 0.05); }
        .topic-compare-table { width: 100%; min-width: 620px; border-collapse: collapse; }
        .topic-compare-table th,
        .topic-compare-table td { padding: 0.95rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid #E2E8F0; }
        .topic-compare-table thead th { background: linear-gradient(180deg, #F8FAFC 0%, #EFF6FF 100%); color: #0F172A; font-size: 0.84rem; font-weight: 800; letter-spacing: -0.01em; }
        .topic-compare-table tbody tr:last-child td { border-bottom: none; }
        .topic-compare-table tbody td:first-child { width: 26%; font-weight: 800; color: #0F172A; background: rgba(248, 250, 252, 0.82); }
        .topic-compare-table td { color: #475569; font-size: 0.88rem; line-height: 1.66; }
        .decision-proof { position: relative; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(240px, 0.88fr); gap: 1rem; margin-top: 1rem; padding: 1.1rem; border-radius: 22px; border: 1px solid var(--app-border); background: #FFFFFF; box-shadow: var(--decision-shadow, 0 12px 32px rgba(15, 23, 42, 0.05)); }
        .decision-proof-media,
        .decision-proof-rail { min-width: 0; }
        .decision-proof-media { position: relative; padding: 1.1rem; border-radius: 18px; border: 1px solid #E2E8F0; background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%); }
        .decision-proof-kicker { display: inline-flex; align-items: center; min-height: 28px; padding: 0.32rem 0.62rem; border-radius: 999px; background: #EFF6FF; color: #1D4ED8; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 0.8rem; }
        .decision-proof-title { font-size: 1.1rem; line-height: 1.3; letter-spacing: -0.03em; color: #0F172A; margin-bottom: 0.55rem; }
        .decision-proof-copy { color: #475569; font-size: 0.9rem; line-height: 1.68; }
        .decision-proof-rail { display: grid; gap: 0.85rem; }
        .decision-proof-note,
        .decision-proof-panel { padding: 0.95rem 1rem; border-radius: 16px; background: linear-gradient(180deg, #FFFFFF 0%, #F8FBFF 100%); border: 1px solid #DBEAFE; box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04); }
        .decision-proof-note strong,
        .decision-proof-panel strong { display: block; font-size: 0.92rem; color: #0F172A; margin-bottom: 0.3rem; }
        .decision-proof-note span,
        .decision-proof-panel span { display: block; color: #475569; font-size: 0.84rem; line-height: 1.6; }
        .decision-proof-panel .decision-proof-brand { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.8rem; margin-bottom: 0.5rem; }
        .decision-proof-panel .decision-proof-brand strong { margin-bottom: 0; }
        .decision-proof-panel .decision-proof-brand span { font-size: 0.72rem; color: #1D4ED8; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
        .decision-proof-panel .decision-proof-link { margin-top: 0.7rem; display: inline-flex; align-items: center; gap: 0.35rem; color: #1D4ED8; font-size: 0.78rem; font-weight: 800; text-decoration: none; }
        .decision-proof-panel .decision-proof-link::after { content: '↗'; font-size: 0.88rem; line-height: 1; }
        .decision-proof.is-benchmark { grid-template-columns: minmax(0, 1fr); }
        .decision-proof.is-benchmark .decision-proof-rail { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
        .decision-route-grid { display: grid; grid-template-columns: 1fr; gap: 0.85rem; margin-top: 1rem; }
        .decision-route-card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1rem; min-width: 0; padding: 1.05rem 1.1rem; border-radius: 18px; border: 1px solid #DBEAFE; background: linear-gradient(180deg, #FFFFFF 0%, #F8FBFF 100%); box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04); color: #0F172A; text-decoration: none; transition: 0.18s ease; overflow: hidden; }
        .decision-route-card::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(180deg, var(--decision-accent, #2563EB) 0%, #93C5FD 100%); }
        .decision-route-card:is(a, button):hover { transform: translateY(-1px); border-color: #93C5FD; box-shadow: 0 14px 28px rgba(37, 99, 235, 0.08); }
        .decision-route-card.is-current { border-color: #C7D2FE; background: linear-gradient(180deg, #FFFFFF 0%, #EEF2FF 100%); }
        .decision-route-card.is-current::before { background: linear-gradient(180deg, #4338CA 0%, #818CF8 100%); }
        .decision-route-card.is-risk::before { background: linear-gradient(180deg, #F59E0B 0%, #FCD34D 100%); }
        .decision-route-card.is-proof::before { background: linear-gradient(180deg, #0F766E 0%, #5EEAD4 100%); }
        .decision-route-copy { min-width: 0; }
        .decision-route-copy strong { display: block; font-size: 1rem; line-height: 1.35; letter-spacing: -0.02em; color: #0F172A; margin-bottom: 0.35rem; }
        .decision-route-copy span { display: block; color: #475569; font-size: 0.86rem; line-height: 1.62; }
        .decision-route-action { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 0.65rem 0.9rem; border-radius: 999px; background: #EFF6FF; border: 1px solid #BFDBFE; color: #1D4ED8; font-size: 0.78rem; font-style: normal; font-weight: 800; white-space: nowrap; }
        .decision-route-action::after { content: '→'; margin-left: 0.32rem; font-size: 0.88rem; line-height: 1; }
        .decision-band .topic-callout { margin-top: 1rem; }
        .decision-band .topic-callout strong { display: block; margin-bottom: 0.35rem; }
        .decision-band .topic-callout span { display: block; color: #334155; line-height: 1.68; font-size: 0.9rem; }
        /* Stronger intent skeletons: change the visible page shape, not only accent colors. */
        .intent-template-hub .topic-hero h1 { max-width: 780px; font-size: clamp(2.35rem, 5.2vw, 4.2rem); }
        .intent-template-hub .topic-hero-main { padding: clamp(2rem, 5vw, 3.4rem); background:
            radial-gradient(circle at 86% 18%, rgba(37, 99, 235, 0.16), transparent 34%),
            linear-gradient(180deg, #FFFFFF 0%, #F8FBFF 100%); }
        .intent-template-hub .hub-picker { border-radius: 28px; }
        .intent-template-hub .template-directory { border-radius: 30px; }
        .template-hub-quickbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.55rem; margin-top: 1.45rem; padding: 0.75rem; border-radius: 22px; border: 1px solid #BFDBFE; background: rgba(239, 246, 255, 0.78); }
        .template-hub-quickbar span { flex: 0 0 auto; color: #1E3A8A; font-size: 0.76rem; font-weight: 900; letter-spacing: 0.05em; text-transform: uppercase; }
        .template-hub-quickbar a { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 0.5rem 0.75rem; border-radius: 999px; background: #FFFFFF; border: 1px solid rgba(191, 219, 254, 0.96); color: #1D4ED8; text-decoration: none; font-size: 0.78rem; font-weight: 800; box-shadow: 0 6px 14px rgba(37, 99, 235, 0.06); }
        .template-hub-quickbar a:hover { background: #DBEAFE; transform: translateY(-1px); }

        .intent-template-detail .topic-shell > .topic-hero { grid-template-columns: minmax(0, 1fr); max-width: 920px; margin-left: auto; margin-right: auto; text-align: center; }
        .intent-template-detail .topic-shell > .topic-hero .topic-hero-main { min-height: 100%; padding: clamp(1.7rem, 3.6vw, 2.75rem); }
        .intent-template-detail .topic-shell > .topic-hero .topic-lead,
        .intent-template-detail .topic-shell > .topic-hero h1 { margin-left: auto; margin-right: auto; }
        .intent-template-detail .topic-shell > .topic-hero .topic-actions { justify-content: center; }
        .intent-template-detail .topic-shell > .topic-hero .topic-actions .primary {
            background: #FFFFFF;
            color: var(--decision-accent, #0E7490);
            border: 1px solid color-mix(in srgb, var(--decision-accent, #0E7490) 28%, #FFFFFF);
            box-shadow: none;
        }
        .intent-template-detail .topic-shell > .topic-hero .topic-actions .primary:hover {
            background: color-mix(in srgb, var(--decision-accent, #0E7490) 7%, #FFFFFF);
        }
        .intent-template-detail .topic-shell > .topic-hero .topic-hero-side { display: none; }
        .intent-template-detail .topic-shell > .topic-preview { margin: -0.35rem 0 2rem; position: relative; z-index: 2; }
        .intent-template-detail .topic-shell > .topic-preview .topic-preview-card { grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.72fr); padding: clamp(1.2rem, 3vw, 1.8rem); border-radius: 28px; border-color: color-mix(in srgb, var(--decision-accent, #0E7490) 22%, #FFFFFF); box-shadow: 0 22px 46px rgba(14, 116, 144, 0.09); }
        .intent-template-detail .topic-shell > .topic-preview .topic-preview-paper { min-height: 420px; display: flex; flex-direction: column; justify-content: space-between; border-radius: 24px; box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 14px 32px rgba(15, 23, 42, 0.08); }
        .intent-template-detail .topic-shell > .topic-preview .topic-preview-paper-head strong { font-size: clamp(1.45rem, 3vw, 2rem); }
        .intent-template-detail .topic-shell > .topic-preview .topic-preview-copy h2 { font-size: clamp(1.65rem, 3vw, 2.3rem); }
        .intent-template-detail .topic-shell > .topic-preview .topic-actions .primary {
            background: var(--decision-accent, #0E7490);
            color: #FFFFFF;
            box-shadow: 0 14px 28px rgba(14, 116, 144, 0.18);
        }
        .intent-template-detail .topic-shell > .topic-preview .topic-actions .primary:hover {
            background: #155E75;
        }
        .intent-template-detail .topic-shell > .topic-cta .primary {
            background: transparent;
            color: var(--decision-accent, #0E7490);
            border: 1px solid color-mix(in srgb, var(--decision-accent, #0E7490) 32%, #FFFFFF);
            box-shadow: none;
        }
        .intent-template-detail .topic-shell > .topic-cta .primary:hover {
            background: color-mix(in srgb, var(--decision-accent, #0E7490) 8%, #FFFFFF);
        }
        .intent-template-detail .topic-content > .hero.topic-hero { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.82fr); gap: 1.25rem; align-items: center; }
        .intent-template-detail .topic-content > .hero.topic-hero .topic-banner-art-inline { float: none; width: 100%; margin: 0; order: 2; }
        .intent-template-detail .topic-content > .hero.topic-hero .hero-actions { grid-column: 1 / 2; }

        .intent-help-answer .topic-shell { max-width: 980px; }
        .intent-help-answer .topic-breadcrumbs,
        .intent-guide .topic-breadcrumbs {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            margin: 0 0 0.75rem;
            padding: 0.38rem 0.65rem;
            border-radius: 999px;
            border: 1px solid color-mix(in srgb, var(--decision-accent, #B45309) 18%, #FFFFFF);
            background: rgba(255,255,255,0.7);
            color: #64748B;
            box-shadow: 0 6px 14px rgba(15, 23, 42, 0.035);
        }
        .intent-help-answer .topic-breadcrumbs a,
        .intent-guide .topic-breadcrumbs a { color: var(--decision-accent, #B45309); font-weight: 800; }
        .intent-guide .topic-breadcrumbs { border-color: #BBF7D0; }
        .intent-help-answer .topic-shell > .topic-hero { grid-template-columns: minmax(0, 1fr) minmax(220px, 0.58fr); gap: 0.9rem; align-items: start; margin-bottom: 0.8rem; }
        .intent-help-answer .topic-shell > .topic-hero .topic-hero-main { padding: clamp(1.35rem, 3vw, 1.9rem); box-shadow: none; background: #FFFFFF; }
        .intent-help-answer .topic-shell > .topic-hero h1 { font-size: clamp(1.85rem, 3.6vw, 2.75rem); line-height: 1.05; letter-spacing: -0.045em; }
        .intent-help-answer .topic-shell > .topic-hero .topic-lead { font-size: 0.98rem; line-height: 1.7; }
        .intent-help-answer .topic-shell > .topic-hero .topic-hero-side { padding: 0.85rem; box-shadow: none; border-color: #FDE68A; background: #FFFBEB; }
        .intent-help-answer .topic-shell > .topic-hero .topic-banner-art-side { border-radius: 18px; margin-bottom: 0.7rem; box-shadow: none; }
        .intent-help-answer .topic-shell > .topic-hero .topic-banner-art-side svg { min-height: 132px; }
        .intent-help-answer .topic-shell > .topic-hero .topic-proof-list { gap: 0.45rem; }
        .intent-help-answer .topic-shell > .topic-hero .topic-proof-item { padding: 0.65rem 0.7rem; background: rgba(255,255,255,0.72); border-color: #FDE68A; }
        .intent-help-answer .topic-shell > .topic-hero + .decision-band.is-proof,
        .intent-help-answer .topic-shell > .topic-hero + .decision-band:not(.decision-band-hero):first-of-type { margin-top: 0.8rem; border-radius: 18px; border-color: #FDE68A; background: linear-gradient(180deg, #FFFBEB 0%, #FFFFFF 100%); box-shadow: 0 8px 20px rgba(180, 83, 9, 0.05); }
        .intent-help-answer .topic-definition-box { border: 0; box-shadow: none; background: transparent; padding: 0; }

        .intent-comparison .topic-shell > .topic-hero,
        .intent-comparison .topic-content > .hero.topic-hero { position: relative; grid-template-columns: minmax(0, 1fr) minmax(300px, 1fr); gap: 2.4rem; border-color: #99F6E4; overflow: visible; background: linear-gradient(90deg, #F8FAFC 0%, #F8FAFC 48%, #ECFDF5 48%, #ECFDF5 100%); }
        .intent-comparison .topic-shell > .topic-hero::after,
        .intent-comparison .topic-content > .hero.topic-hero::after { content: 'VS'; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 0; display: inline-flex; align-items: center; justify-content: center; width: 3.6rem; height: 3.6rem; border-radius: 999px; background: #0F766E; color: #FFFFFF; font-size: 0.78rem; font-weight: 900; letter-spacing: 0.08em; box-shadow: 0 18px 34px rgba(15, 118, 110, 0.18); pointer-events: none; }
        .intent-comparison .topic-hero-main,
        .intent-comparison .topic-hero-side,
        .intent-comparison .topic-content > .hero.topic-hero > * { position: relative; z-index: 1; }
        .intent-comparison .topic-shell > .topic-hero .topic-hero-main,
        .intent-comparison .topic-shell > .topic-hero .topic-hero-side { border-radius: 26px; box-shadow: 0 14px 32px rgba(15, 118, 110, 0.08); }
        .intent-comparison .topic-shell > .topic-hero .topic-hero-main { border-color: #E2E8F0; background: #FFFFFF; }
        .intent-comparison .topic-shell > .topic-hero .topic-hero-side { border-color: #99F6E4; background: linear-gradient(180deg, #F0FDFA 0%, #FFFFFF 100%); }
        .intent-comparison .topic-content > .hero.topic-hero .topic-banner-art-inline { grid-column: 2; grid-row: 1 / span 4; margin: 0; align-self: center; }
        .intent-comparison .topic-compare-table-wrap { border-color: #99F6E4; box-shadow: 0 14px 30px rgba(15, 118, 110, 0.08); }
        .intent-comparison .topic-compare-table thead th { background: linear-gradient(180deg, #ECFDF5 0%, #CCFBF1 100%); }
        .intent-comparison .topic-related-card:nth-child(even)::before { background: linear-gradient(180deg, #F59E0B 0%, #FCD34D 100%); }

        .intent-guide .topic-shell { max-width: 1040px; }
        .intent-guide .topic-shell > .topic-hero,
        .intent-guide .topic-content > .hero.topic-hero { display: block; max-width: 980px; margin-left: auto; margin-right: auto; text-align: center; padding: clamp(2rem, 5vw, 3.25rem); border-radius: 34px; border-color: #BBF7D0; }
        .intent-guide .topic-shell > .topic-hero .topic-hero-main,
        .intent-guide .topic-shell > .topic-hero .topic-hero-side { padding: 0; border: 0; background: transparent; box-shadow: none; }
        .intent-guide .topic-shell > .topic-hero h1,
        .intent-guide .topic-content > .hero.topic-hero h1 { margin-left: auto; margin-right: auto; max-width: 850px; font-size: clamp(2.2rem, 5.4vw, 4rem); }
        .intent-guide .topic-shell > .topic-hero .topic-lead,
        .intent-guide .topic-content > .hero.topic-hero .hero-copy { margin-left: auto; margin-right: auto; max-width: 720px; }
        .intent-guide .topic-shell > .topic-hero .topic-actions,
        .intent-guide .topic-content > .hero.topic-hero .hero-actions { justify-content: center; }
        .intent-guide .topic-shell > .topic-hero .topic-hero-side { max-width: 760px; margin: 1.35rem auto 0; }
        .intent-guide .topic-shell > .topic-hero .topic-banner-art-side,
        .intent-guide .topic-content > .hero.topic-hero .topic-banner-art-inline { max-width: 740px; margin: 1.4rem auto 1.1rem; box-shadow: 0 18px 36px rgba(21, 128, 61, 0.09); }
        .intent-guide .topic-shell > .topic-hero .topic-proof-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.55rem; }
        .intent-guide .topic-shell > .topic-hero .topic-proof-item { text-align: left; background: rgba(255,255,255,0.76); border-color: #BBF7D0; box-shadow: none; }
        .intent-guide .decision-checklist > li::before,
        .intent-guide .decision-route-card::before { background: linear-gradient(180deg, #15803D 0%, #86EFAC 100%); }
        .intent-guide .topic-shell > .decision-band.is-proof:first-of-type,
        .intent-guide .topic-content > .decision-band.is-proof:first-of-type { max-width: 860px; margin: 1.5rem auto 0; border-radius: 24px; background: linear-gradient(180deg, #F0FDF4 0%, #FFFFFF 100%); border-color: #BBF7D0; box-shadow: 0 12px 26px rgba(21, 128, 61, 0.07); }

        .intent-trust .topic-shell > .topic-hero { grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.7fr); }
        .intent-trust .topic-shell > .topic-hero .topic-hero-main,
        .intent-trust .topic-shell > .topic-hero .topic-hero-side { box-shadow: none; }
        .intent-trust .topic-shell > .topic-grid { max-width: 880px; }
        .seo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.25rem; }
        .seo-card { background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 14px; padding: 1.1rem; }
        .seo-card h3 { margin-bottom: 0.65rem; font-size: 1rem; color: #0F172A; }
        .seo-card p + p { margin-top: 0.65rem; }
        .seo-steps ol { margin: 0.75rem 0 0 1.25rem; }
        .seo-steps li + li { margin-top: 0.5rem; }
        .seo-faq { margin-top: 1.25rem; }
        .seo-faq .faq-item + .faq-item { margin-top: 1rem; }
        @media (max-width: 900px) {
            .topic-nav { flex-wrap: wrap; align-items: flex-start; }
            .topic-nav-links { width: 100%; justify-content: flex-start; }
            .topic-language-picker { width: 100%; }
            .topic-language-picker select { width: min(220px, 100%); }
            .app-nav-links { display: flex; width: 100%; order: 1; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 0.15rem; scrollbar-width: none; }
            .app-nav-links::-webkit-scrollbar { display: none; }
            .app-nav-links a { flex: 0 0 auto; }
            .nav-language-picker { width: auto; justify-content: flex-end; }
            .nav-controls { justify-content: flex-start; align-items: stretch; }
            .nav-secondary-controls { width: 100%; order: 2; margin-left: 0; }
            body.history-sidebar-hidden .app-nav-links { display: flex; }
            .page-hero-copy,
            .page-hero-copy.is-featured { grid-template-columns: 1fr; }
            .seo-grid { grid-template-columns: 1fr; }
            .decision-band,
            .decision-proof,
            .decision-band.is-split { grid-template-columns: 1fr; }
            .decision-signal-grid { grid-template-columns: 1fr; }
            .decision-signal-grid > *,
            .decision-signal-grid > *.is-wide,
            .decision-signal-grid > *.is-full { grid-column: 1 / -1; }
            .decision-route-card { grid-template-columns: 1fr; align-items: start; }
            .template-directory-grid { grid-template-columns: 1fr; }
            .template-directory-list li { grid-template-columns: 1fr; gap: 0.22rem; }
            .topic-banner-art-inline { max-width: none; }
            .intent-template-detail .topic-content > .hero.topic-hero .topic-banner-art-inline { float: none; width: 100%; margin: 1rem 0 0; }
            .intent-template-detail .topic-content > .hero.topic-hero { grid-template-columns: 1fr; }
            .intent-template-detail .topic-content > .hero.topic-hero .hero-actions { grid-column: auto; }
            .intent-template-detail .topic-shell > .topic-hero,
            .intent-help-answer .topic-shell > .topic-hero,
            .intent-comparison .topic-shell > .topic-hero,
            .intent-trust .topic-shell > .topic-hero { grid-template-columns: 1fr; }
            .intent-template-detail .topic-shell > .topic-preview .topic-preview-card { grid-template-columns: 1fr; }
            .intent-help-answer .topic-shell > .topic-hero .topic-hero-side {
                display: grid;
                grid-template-columns: 140px minmax(0, 1fr);
                gap: 0.7rem;
                align-items: start;
            }
            .intent-help-answer .topic-shell > .topic-hero .topic-banner-art-side { margin-bottom: 0; }
            .intent-help-answer .topic-shell > .topic-hero .topic-banner-art-side svg { min-height: 108px; }
            .intent-guide .topic-shell > .topic-hero .topic-proof-list { grid-template-columns: 1fr; }
            .intent-comparison .topic-content .topic-related-grid,
            .intent-comparison .topic-shell .topic-related-grid { grid-template-columns: 1fr; }
            .intent-comparison .topic-shell > .topic-hero::after,
            .intent-comparison .topic-content > .hero.topic-hero::after { left: auto; right: 1rem; top: 1rem; transform: none; width: 2.8rem; height: 2.8rem; }
        }
        @media (max-width: 768px) {
            .mcp-connect-banner { margin-top: 0.55rem; padding: 0.78rem; grid-template-columns: 1fr; gap: 0.72rem; border-radius: 10px; }
            .mcp-connect-copy { grid-template-columns: 1fr; gap: 0.24rem; }
            .mcp-connect-title { font-size: 0.9rem; }
            .mcp-connect-body,
            .mcp-connect-meta { white-space: normal; overflow: visible; text-overflow: clip; }
            .mcp-connect-body { font-size: 0.8rem; }
            .mcp-connect-meta { grid-column: auto; font-size: 0.72rem; }
            .mcp-connect-actions { justify-content: stretch; display: grid; grid-template-columns: 1fr; gap: 0.38rem; }
            .mcp-connect-btn { min-height: 36px; padding: 0.48rem 0.62rem; font-size: 0.72rem; }
            .watermark-upgrade-content { width: calc(100% - 1rem); padding: 1.25rem; max-height: calc(100vh - 1rem); }
            .watermark-offer { grid-template-columns: 1fr; }
            .watermark-offer button { width: 100%; }
            .page-hero-copy,
            .page-hero-copy.is-featured { padding: 1.15rem; }
            .page-hero-dismiss { top: 0.7rem; right: 1.45rem; width: 32px; height: 32px; }
            .page-route-shell { padding: 1rem; }
            .page-route-head { flex-direction: column; }
            .page-route-guide { width: 100%; }
            .page-hero-actions { flex-direction: column; }
            .page-hero-primary, .page-hero-secondary { width: 100%; }
            .topic-nav { padding: 0.8rem 1rem; gap: 0.7rem; }
            .topic-nav .logo { font-size: 1.02rem; }
            .topic-nav-links { gap: 0.45rem; }
            .topic-nav-links a { font-size: 0.76rem; padding: 0.48rem 0.68rem; }
            .topic-language-picker select { min-height: 40px; width: 100%; }
            .decision-band,
            .decision-proof { padding: 1rem; border-radius: 18px; }
            .decision-checklist > li,
            .decision-route-grid > * { border-radius: 16px; }
            .template-directory { padding: 1rem; border-radius: 18px; }
            .invoice-template-page .template-learning-index .topic-link-row { grid-template-columns: 1fr; }
            .topic-banner-art { border-radius: 22px; }
            .topic-banner-art svg { min-height: 150px; }
            .topic-content { padding: 1.2rem 1rem 3rem; }
            .topic-content > .hero.topic-hero { padding: 1.25rem; border-radius: 20px; }
            .topic-content > .hero.topic-hero h1 { font-size: clamp(1.75rem, 11vw, 2.45rem); }
            .intent-help-answer .topic-shell > .topic-hero .topic-hero-side { grid-template-columns: 1fr; }
            .intent-help-answer .topic-shell > .topic-hero .topic-banner-art-side { display: none; }
            .intent-guide .topic-content > .topic-grid.two-up > .topic-card { padding-left: 1.1rem; padding-top: 3.65rem; }
        }
        @media (min-width: 769px) and (max-width: 1100px) {
            body.history-sidebar-hidden .app-nav-links { display: flex; }
        }
        @media (max-width: 768px) {
            nav { padding: 0.6rem 0.75rem; min-height: auto; align-items: center; gap: 0.65rem; }
            .logo-area { display: flex; width: auto; min-height: auto; padding: 0; padding-left: 0; border-right: none; }
            .logo { font-size: 1.06rem; }
            .mobile-nav-summary { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 0.45rem; flex: 1 1 auto; min-width: 0; }
            .mobile-nav-summary .save-status-indicator { padding: 0.6rem 0.75rem; border-radius: 999px; border: 1px solid #E2E8F0; background: #F8FAFC; }
            .mobile-nav-new-invoice { display: inline-flex; }
            .mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 42px; min-width: 42px; height: 42px; padding: 0; border-radius: 14px; border: 1px solid rgba(203, 213, 225, 0.96); background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(241,245,249,0.92) 100%); box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255,255,255,0.88); }
            body.mobile-nav-open .mobile-menu-toggle-icon { background: transparent; }
            body.mobile-nav-open .mobile-menu-toggle-icon::before { top: 0; transform: rotate(45deg); }
            body.mobile-nav-open .mobile-menu-toggle-icon::after { top: 0; transform: rotate(-45deg); }
            .nav-controls { display: none; }
            body.mobile-nav-open .nav-controls { position: absolute; top: calc(100% - 0.1rem); left: 0.75rem; right: 0.75rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(110px, auto); align-items: start; gap: 0.7rem; padding: 0.9rem; background: rgba(255, 255, 255, 0.98); border: 1px solid #E2E8F0; border-radius: 20px; box-shadow: 0 24px 48px rgba(15, 23, 42, 0.14); backdrop-filter: blur(16px) saturate(1.15); }
            .app-nav-links { width: 100%; grid-column: 1 / 2; grid-row: 1; flex-direction: row; gap: 0.45rem; overflow-x: auto; padding-bottom: 0; }
            .app-nav-links a { width: auto; min-width: max-content; justify-content: center; min-height: 38px; padding: 0.52rem 0.74rem; font-size: 0.74rem; border-radius: 999px; background: #F8FAFC; border: 1px solid #E2E8F0; }
            .nav-secondary-controls { width: 100%; display: contents; }
            .nav-secondary-controls > * { width: 100%; min-width: 0; }
            .nav-secondary-controls > button,
            .nav-secondary-controls > div:not(#backup-reminder):not(.nav-language-picker),
            .nav-language-picker { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 42px; padding: 0.68rem 0.8rem; border-radius: 14px; background: #F8FAFC; border: 1px solid #E2E8F0; box-shadow: none; }
            .nav-status-desktop { display: none !important; }
            .nav-language-picker { grid-column: 2 / 3; grid-row: 1; align-self: stretch; width: auto; min-width: 110px; padding: 0.28rem 0.42rem; margin-left: 0; }
            .nav-language-picker select { width: 100%; max-width: none; min-width: 0; min-height: 38px; padding: 0.5rem 0.7rem; }
            .nav-secondary-controls > #backup-reminder { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
            .nav-secondary-controls > .mobile-history-btn,
            .nav-secondary-controls > .btn-sync { grid-row: 3; }
            .nav-secondary-controls > .mobile-history-btn { grid-column: 1 / 2; }
            .nav-secondary-controls > .btn-sync:not(.mobile-history-btn) { grid-column: 2 / 3; }
        }
