:root {
    /* FinTech trust palette — deep emerald CTAs, slate surfaces, navy ink */
    --brand: #047857;
    --brand-dark: #065f46;
    --brand-light: #ecfdf5;
    --brand-rgb: 4, 120, 87;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --surface: #ffffff;
    --bg: #f8fafc;
    --success: #047857;
    --danger: #991b1b;
    --focus-ring: rgba(59, 130, 246, 0.2);
    --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 4px 12px rgba(15, 23, 42, 0.04);
    --radius: 12px;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg);
    background-image:
        radial-gradient(ellipse 90% 55% at 50% -18%, rgba(var(--brand-rgb), 0.10), transparent 55%),
        radial-gradient(ellipse 50% 40% at 100% 0%, rgba(15, 23, 42, 0.05), transparent 50%),
        radial-gradient(ellipse 45% 35% at 0% 100%, rgba(var(--brand-rgb), 0.05), transparent 45%);
    background-attachment: fixed;
    color: var(--ink);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    line-height: 1.5;
    margin: 0;
    min-height: 100vh;
}

body::before {
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
    background-size: 48px 48px;
    content: "";
    inset: 0;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 10%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 10%, transparent 70%);
    opacity: 0.55;
    pointer-events: none;
    position: fixed;
    z-index: 0;
}

body > * {
    position: relative;
    z-index: 1;
}

body.nav-menu-open {
    overflow: hidden;
}

a {
    color: var(--brand);
    text-decoration: none;
}

.site-header {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header.nav-open {
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0 auto;
    max-width: 1280px;
    padding: 14px 24px 16px;
    position: relative;
}

.header-top {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    width: 100%;
}

.logo {
    align-items: center;
    display: flex;
    gap: 10px;
    min-width: 0;
}

.logo-trust {
    align-items: center;
    background: var(--brand-light);
    border: 1px solid rgba(var(--brand-rgb), 0.22);
    border-radius: 999px;
    color: var(--brand-dark);
    display: inline-flex;
    flex-shrink: 0;
    gap: 6px;
    margin-left: 2px;
    padding: 6px 10px 6px 8px;
}

.logo-trust svg {
    display: block;
    flex-shrink: 0;
}

.logo-trust-label {
    color: var(--brand-dark);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.logo-mark {
    align-items: center;
    background: var(--brand);
    border-radius: 10px;
    color: #fff;
    display: inline-flex;
    font-size: 18px;
    font-weight: 800;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.logo-text {
    color: var(--ink);
    font-size: clamp(18px, 3vw, 22px);
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logo-img {
    display: block;
    height: clamp(36px, 5vw, 46px);
    max-width: min(220px, 52vw);
    object-fit: contain;
    object-position: left center;
    width: auto;
}

.footer-logo-img {
    border-radius: 10px;
    display: block;
    height: 52px;
    margin-bottom: 8px;
    max-width: 220px;
    object-fit: contain;
    object-position: left center;
    width: auto;
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    width: 100%;
}

.main-nav a {
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.main-nav a.active,
.main-nav a:hover {
    color: var(--brand);
}

.main-nav a.header-cta--mobile {
    letter-spacing: normal;
    text-transform: none;
}

.header-cta {
    background: var(--brand);
    border-radius: 8px;
    color: #fff;
    flex-shrink: 0;
    font-size: clamp(12px, 2vw, 14px);
    font-weight: 700;
    letter-spacing: normal;
    padding: 10px 18px;
    text-transform: none;
    white-space: nowrap;
}

a.header-cta,
a.header-cta:link,
a.header-cta:visited,
a.header-cta:hover,
a.header-cta:focus-visible,
a.header-cta:active {
    color: #fff;
}

.header-cta:hover {
    background: var(--brand-dark);
    color: #fff;
}

.process-path {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.process-path-inner {
    align-items: center;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 12px;
    font-weight: 600;
    gap: 8px 12px;
    justify-content: center;
    letter-spacing: 0.02em;
    margin: 0 auto;
    max-width: 1280px;
    padding: 10px 24px;
}

.process-path-step {
    align-items: center;
    color: var(--muted);
    display: inline-flex;
    gap: 6px;
}

.process-path-step.is-active {
    color: var(--ink);
}

.process-path-num {
    align-items: center;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink);
    display: inline-flex;
    font-size: 11px;
    font-weight: 700;
    height: 22px;
    justify-content: center;
    min-width: 22px;
}

.process-path-step.is-active .process-path-num {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.process-path-sep {
    color: var(--line);
    font-weight: 400;
    user-select: none;
}

@media (max-width: 640px) {
    .logo-trust-label {
        display: none;
    }

    .process-path-inner {
        font-size: 11px;
        gap: 6px 8px;
        padding: 8px 16px;
    }
}

.header-top-end {
    align-items: center;
    display: flex;
    flex-shrink: 0;
    gap: 12px;
}

.header-cart {
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink);
    display: inline-flex;
    font-size: 14px;
    font-weight: 600;
    gap: 8px;
    padding: 8px 12px;
    text-decoration: none;
}

.header-cart:hover {
    border-color: rgba(var(--brand-rgb), 0.45);
    color: var(--brand);
}

.header-cart-count {
    align-items: center;
    background: var(--brand);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    height: 22px;
    justify-content: center;
    min-width: 22px;
    padding: 0 6px;
}

.header-cart-count.is-empty {
    opacity: 0.65;
}

.add-to-cart-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.cart-page .cart-items-list {
    display: grid;
    gap: 12px;
}

.cart-item-row {
    align-items: flex-start;
    border: 1px solid var(--line);
    border-radius: 12px;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 16px;
}

.cart-item-title {
    font-size: 16px;
    margin: 0 0 6px;
}

.cart-item-meta {
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 13px;
    gap: 8px 12px;
    margin: 0;
}

.cart-item-price {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: right;
    white-space: nowrap;
}

.btn-text,
.cart-preview-btn {
    background: none;
    border: 0;
    color: var(--accent, #0f766e);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.btn-text:hover,
.cart-preview-btn:hover {
    opacity: 0.85;
}

.checkout-item-row .cart-preview-btn {
    display: inline-block;
    margin-top: 6px;
}

body.cart-preview-open {
    overflow: hidden;
}

.cart-preview-modal .template-modal-dialog {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: min(90vh, 920px);
    max-width: min(960px, 96vw);
    overflow: hidden;
    padding: 16px 16px 12px;
    width: min(960px, 96vw);
}

.cart-preview-modal .template-modal-header,
.cart-preview-modal .template-modal-footer {
    flex-shrink: 0;
}

.cart-preview-frame-wrap {
    background: #e5e7eb;
    border: 1px solid var(--line, #d1d5db);
    border-radius: 12px;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    position: relative;
}

.cart-preview-frame {
    background: #525659;
    border: 0;
    display: block;
    height: 100%;
    width: 100%;
}

.cart-preview-frame[hidden],
.cart-preview-image-panel[hidden],
.cart-preview-loading[hidden] {
    display: none !important;
}

.cart-preview-image-panel {
    align-items: flex-start;
    background: #e5e7eb;
    display: flex;
    height: 100%;
    justify-content: center;
    overflow: auto;
    padding: 12px;
}

.cart-preview-image {
    background: #fff;
    display: block;
    height: auto;
    max-width: 100%;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
}

.cart-preview-loading {
    align-items: center;
    background: rgba(249, 250, 251, 0.92);
    display: flex;
    inset: 0;
    justify-content: center;
    position: absolute;
    z-index: 2;
}

.cart-preview-loading-text {
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.cart-preview-modal .template-modal-footer {
    align-items: center;
}

.cart-preview-modal .template-modal-counter {
    flex: 1;
    margin: 0;
    text-align: left;
}

.cart-summary-row {
    align-items: center;
    display: flex;
    font-size: 18px;
    justify-content: space-between;
    margin-bottom: 12px;
}

.cart-summary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.cart-empty-card .btn,
.cart-summary-actions .btn {
    min-width: 180px;
}

.checkout-layout {
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
}

.checkout-sidebar {
    align-self: start;
    position: sticky;
    top: 24px;
}

.checkout-items-list {
    display: grid;
    gap: 12px;
}

.checkout-item-row,
.checkout-total-row {
    align-items: flex-start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.checkout-item-meta,
.order-meta-label {
    color: var(--muted);
    font-size: 13px;
    margin: 4px 0 0;
}

.checkout-totals {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 10px;
    margin-top: 18px;
    padding-top: 18px;
}

.checkout-total-row--grand {
    font-size: 18px;
}

.checkout-actions {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.paypal-button-container {
    max-width: 420px;
    width: 100%;
}

#paypal-payment-status.error {
    color: #b42318;
}

#paypal-payment-status.success {
    color: #027a48;
}

.payment-method-list {
    display: grid;
    gap: 10px;
}

.payment-method-option {
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    font-weight: 600;
    gap: 10px;
    padding: 12px 14px;
}

.payment-method-option:has(input:checked) {
    border-color: rgba(var(--brand-rgb), 0.55);
    box-shadow: inset 0 0 0 1px rgba(var(--brand-rgb), 0.25);
}

.field-error {
    color: var(--danger);
    display: block;
    font-size: 13px;
    margin-top: 6px;
}

.order-meta-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 960px) {
    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .checkout-sidebar {
        position: static;
    }

    .order-meta-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.dashboard-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 20px;
}

.dashboard-nav a {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    padding: 8px 14px;
    text-decoration: none;
}

.dashboard-nav a.active,
.dashboard-nav a:hover {
    border-color: rgba(var(--brand-rgb), 0.55);
    color: var(--brand);
}

.dashboard-title-row {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    justify-content: space-between;
}

.dashboard-stats {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 20px;
}

.dashboard-stat-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    display: grid;
    gap: 6px;
    padding: 16px;
}

.dashboard-stat-label {
    color: var(--muted);
    font-size: 13px;
}

.dashboard-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-list-row {
    align-items: center;
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    justify-content: space-between;
    padding: 14px 0;
}

.dashboard-list-row:first-child {
    border-top: 0;
    padding-top: 0;
}

.dashboard-list-main {
    align-items: center;
    display: flex;
    gap: 12px;
    min-width: 0;
}

.dashboard-company-logo {
    border: 1px solid var(--line);
    border-radius: 8px;
    flex: 0 0 auto;
    height: 40px;
    object-fit: contain;
    width: 40px;
}

.dashboard-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
}

.dashboard-disabled-action {
    color: var(--muted);
    font-size: 14px;
}

.dashboard-empty {
    display: grid;
    gap: 12px;
    justify-items: start;
    padding: 8px 0 4px;
}

.dashboard-pagination {
    border-top: 1px solid var(--line);
    margin-top: 8px;
    padding-top: 16px;
}

.dashboard-pager {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dashboard-pager a,
.dashboard-pager-current,
.dashboard-pager-disabled {
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 10px;
    text-decoration: none;
}

.dashboard-pager a {
    background: #fff;
    color: var(--ink);
}

.dashboard-pager a:hover {
    border-color: rgba(var(--brand-rgb), 0.55);
    color: var(--brand);
}

.dashboard-pager-current {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.dashboard-pager-disabled {
    color: var(--muted);
    opacity: 0.7;
}

.dashboard-badge {
    background: #f1f5f9;
    border-radius: 999px;
    color: var(--muted);
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-left: 6px;
    padding: 2px 8px;
    text-transform: uppercase;
    vertical-align: middle;
}

.dashboard-badge--paid {
    background: rgba(4, 120, 87, 0.12);
    color: #065f46;
}

.dashboard-badge--pending,
.dashboard-badge--processing {
    background: rgba(217, 119, 6, 0.12);
    color: #92400e;
}

.dashboard-badge--failed,
.dashboard-badge--cancelled,
.dashboard-badge--cancelleded {
    background: rgba(153, 27, 27, 0.1);
    color: #991b1b;
}

.dashboard-add-employee {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dashboard-add-employee-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    width: 100%;
}

.dashboard-add-employee-select {
    border: 1px solid var(--line);
    border-radius: 10px;
    min-width: 220px;
    padding: 10px 12px;
}

.dashboard-logo-preview {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 0 0 18px;
}

.dashboard-logo-preview img {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    height: 96px;
    object-fit: contain;
    width: 96px;
}

.field-inline {
    align-items: center;
    color: var(--ink);
    display: inline-flex;
    font-size: 14px;
    gap: 8px;
}

.header-account {
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.header-auth {
    align-items: center;
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 12px;
}

.header-auth--mobile {
    display: none;
}

.header-logout-form {
    margin: 0;
}

.auth-card {
    max-width: 480px;
}

.auth-page {
    padding-bottom: 48px;
    padding-top: 28px;
}

.auth-shell {
    align-items: stretch;
    background:
        linear-gradient(145deg, rgba(var(--brand-rgb), 0.08), rgba(26, 43, 73, 0.03) 42%, #fff),
        var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    margin: 0 auto;
    max-width: 920px;
    overflow: hidden;
}

.auth-shell--single {
    grid-template-columns: 1fr;
    max-width: 480px;
}

.auth-panel {
    padding: 36px 34px;
}

.auth-panel--brand {
    background:
        radial-gradient(circle at 12% 18%, rgba(var(--brand-rgb), 0.18), transparent 42%),
        linear-gradient(165deg, #13233f 0%, #1a2b49 55%, #163526 100%);
    color: #fff;
}

.auth-panel-kicker {
    color: rgba(232, 248, 238, 0.88);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin: 0 0 12px;
    text-transform: uppercase;
}

.auth-panel-title {
    color: #fff;
    font-size: clamp(28px, 3vw, 34px);
    font-weight: 750;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin: 0 0 12px;
}

.auth-panel-lead {
    color: rgba(255, 255, 255, 0.78);
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 28px;
    max-width: 34ch;
}

.auth-panel-points {
    display: grid;
    gap: 14px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.auth-panel-points li {
    align-items: flex-start;
    display: flex;
    gap: 12px;
}

.auth-panel-points .section-icon {
    background: rgba(255, 255, 255, 0.12);
    color: #d8f5e4;
    flex-shrink: 0;
}

.auth-panel-points span {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.45;
    padding-top: 8px;
}

.auth-panel--form {
    background: var(--surface);
}

.auth-form-header {
    margin-bottom: 22px;
}

.auth-form-header h2 {
    font-size: 24px;
    font-weight: 750;
    letter-spacing: -0.02em;
    margin: 0 0 6px;
}

.auth-form-header p {
    color: var(--muted);
    font-size: 14px;
    margin: 0;
}

.auth-form {
    display: grid;
    gap: 16px;
}

.auth-form .field-label {
    display: inline-block;
    font-size: 13px;
    font-weight: 650;
    margin-bottom: 6px;
}

.auth-form .field-label-row {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 6px;
}

.auth-form .field-label-row .field-label {
    margin-bottom: 0;
}

.auth-form .field input[type="email"],
.auth-form .field input[type="password"],
.auth-form .field input[type="text"] {
    border: 1px solid var(--line);
    border-radius: 10px;
    display: block;
    font-size: 15px;
    margin-top: 0;
    min-height: 46px;
    padding: 11px 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    width: 100%;
}

.auth-form .field input:focus {
    border-color: rgba(var(--brand-rgb), 0.55);
    box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.14);
    outline: none;
}

.auth-inline-link {
    color: var(--brand);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.auth-inline-link:hover {
    text-decoration: underline;
}

.auth-remember {
    margin-top: 2px;
}

.auth-submit {
    margin-top: 4px;
    min-height: 48px;
    width: 100%;
}

.auth-status {
    margin-bottom: 16px;
}

.auth-switch {
    color: var(--muted, #5b6472);
    font-size: 0.95rem;
    margin: 20px 0 0;
    text-align: center;
}

.auth-switch a {
    color: var(--brand, #047857);
    font-weight: 600;
    text-decoration: none;
}

.auth-switch a:hover {
    text-decoration: underline;
}

@media (max-width: 860px) {
    .auth-shell {
        grid-template-columns: 1fr;
        max-width: 520px;
    }

    .auth-panel--brand {
        padding-bottom: 28px;
    }

    .auth-panel-lead {
        max-width: none;
    }
}

@media (max-width: 720px) {
    .header-cart-label {
        display: none;
    }

    .cart-item-row {
        flex-direction: column;
    }

    .cart-item-price {
        align-items: flex-start;
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
    }
}

.nav-toggle {
    align-items: center;
    background: var(--brand-light);
    border: 1px solid rgba(var(--brand-rgb), 0.35);
    border-radius: 10px;
    color: var(--ink);
    cursor: pointer;
    display: none;
    flex-shrink: 0;
    height: 44px;
    justify-content: center;
    padding: 0;
    width: 44px;
}

.nav-toggle-icon {
    display: block;
    height: 24px;
    width: 24px;
}

.nav-toggle-line {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 2;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-header.nav-open .nav-toggle-line-top {
    transform: translateY(5px) rotate(45deg);
    transform-origin: center;
}

.site-header.nav-open .nav-toggle-line-mid {
    opacity: 0;
}

.site-header.nav-open .nav-toggle-line-bottom {
    transform: translateY(-5px) rotate(-45deg);
    transform-origin: center;
}

.header-cta:hover {
    background: var(--brand-dark);
    color: #fff;
}

.header-cta--mobile {
    display: none;
    justify-content: center;
    margin-top: 8px;
    text-align: center;
    width: 100%;
}

.page-shell {
    margin: 0 auto;
    max-width: 1280px;
    padding: 28px 20px 80px;
}

.page-shell--create,
.page-shell:has(.paystub-form) {
    background: transparent;
}

.page-title {
    margin-bottom: 24px;
    text-align: center;
}

.page-title h1 {
    color: var(--ink);
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 800;
    letter-spacing: -0.025em;
    margin: 0 0 8px;
}

.page-title p {
    color: var(--muted);
    font-size: 16px;
    margin: 0;
}

.remote-api-banner {
    background: var(--brand-light);
    border: 1px solid rgba(var(--brand-rgb), 0.25);
    border-radius: 999px;
    color: var(--brand-dark);
    display: inline-block;
    font-size: 14px;
    margin-top: 12px;
    padding: 8px 14px;
}

.stepper {
    display: flex;
    gap: 0;
    justify-content: center;
    margin: 0 auto 32px;
    max-width: 640px;
}

.step {
    align-items: center;
    color: var(--muted);
    display: flex;
    flex: 1;
    flex-direction: column;
    font-size: 13px;
    font-weight: 700;
    gap: 8px;
    position: relative;
    text-transform: uppercase;
}

.step::after {
    background: var(--line);
    content: "";
    height: 3px;
    left: 50%;
    position: absolute;
    top: 18px;
    width: 100%;
    z-index: 0;
}

.step:last-child::after {
    display: none;
}

.step-icon {
    align-items: center;
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: 50%;
    display: flex;
    font-size: 18px;
    height: 36px;
    justify-content: center;
    position: relative;
    width: 36px;
    z-index: 1;
}

.step.active .step-icon,
.step.done .step-icon {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.step.active,
.step.done {
    color: var(--brand);
}

.layout-grid {
    align-items: start;
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-column {
    display: grid;
    gap: 20px;
    grid-column: 1;
}

.preview-column {
    grid-column: 2 / 4;
    position: sticky;
    top: 118px;
}

.section-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.section-head {
    align-items: center;
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 12px;
    padding: 16px 20px;
}

.section-head h2 {
    color: var(--ink);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0;
}

.section-icon {
    align-items: center;
    background: var(--brand-light);
    border-radius: 10px;
    color: var(--brand);
    display: flex;
    font-size: 11px;
    font-weight: 700;
    height: 40px;
    justify-content: center;
    letter-spacing: 0.02em;
    line-height: 1;
    text-transform: uppercase;
    width: 40px;
}

.section-icon--svg {
    letter-spacing: 0;
    text-transform: none;
}

.section-icon--svg svg {
    display: block;
    flex-shrink: 0;
    height: 20px;
    width: 20px;
}

.section-body {
    padding: 20px;
}

.section-note {
    background: #f8fafc;
    border-left: 3px solid var(--brand);
    border-radius: 8px;
    color: var(--muted);
    font-size: 14px;
    margin: 0 0 18px;
    padding: 10px 12px;
}

.grid-2 {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
}

.grid-3 {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
}

.grid-auto {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
}

label.field {
    display: block;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.4;
}

label.field .req {
    color: var(--danger);
    margin-right: 2px;
}

label.field input,
label.field select,
label.field textarea {
    display: block;
    margin-top: 8px;
}

label.field .hint {
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
}

.company-logo-field input[type="file"] {
    display: block;
    margin-top: 6px;
}

.company-logo-preview {
    align-items: center;
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.company-logo-preview.hidden {
    display: none;
}

.company-logo-preview img {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    max-height: 72px;
    max-width: 180px;
    object-fit: contain;
    padding: 6px;
}

input,
select,
textarea {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: var(--ink);
    font: inherit;
    font-size: 15px;
    padding: 12px 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    width: 100%;
}

input[inputmode="numeric"],
input[inputmode="decimal"],
input[type="number"],
.tabular-nums {
    font-variant-numeric: tabular-nums;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px var(--focus-ring);
    outline: none;
}

input[readonly],
select[readonly],
textarea[readonly] {
    background: #f8fafc;
    color: var(--muted);
    cursor: default;
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.radio-pill {
    align-items: center;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    font-size: 14px;
    font-weight: 600;
    gap: 8px;
    padding: 10px 16px;
}

.radio-pill input {
    accent-color: var(--brand);
    height: 16px;
    width: 16px;
}

.radio-pill:has(input:checked) {
    background: var(--brand-light);
    border-color: var(--brand);
    color: var(--brand-dark);
}

.checkbox-row {
    align-items: center;
    display: flex;
    font-size: 14px;
    font-weight: 600;
    gap: 10px;
    min-height: 42px;
}

.checkbox-row input {
    accent-color: var(--brand);
    height: 18px;
    width: 18px;
}

.collapsible {
    border: 1px dashed var(--line);
    border-radius: 12px;
    margin-top: 16px;
    overflow: hidden;
}

.collapsible-toggle {
    align-items: center;
    background: #f8fafc;
    border: 0;
    color: var(--brand);
    cursor: pointer;
    display: flex;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    gap: 8px;
    justify-content: space-between;
    padding: 14px 16px;
    width: 100%;
}

.collapsible-body {
    display: none;
    padding: 16px;
}

.collapsible.open .collapsible-body {
    display: block;
}

.collapsible.open .collapsible-toggle .chevron {
    transform: rotate(180deg);
}

.paydate-accordion {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.paydate-accordion-item {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
}

.paydate-accordion-header {
    align-items: center;
    display: flex;
    gap: 8px;
}

.paydate-accordion-toggle {
    align-items: center;
    background: #f8fafc;
    border: 0;
    color: var(--ink);
    cursor: pointer;
    display: flex;
    flex: 1;
    font: inherit;
    gap: 12px;
    justify-content: space-between;
    min-height: 52px;
    padding: 12px 16px;
    text-align: left;
    transition: background 0.15s ease;
}

.paydate-accordion-toggle:hover {
    background: #f1f5f9;
}

.paydate-accordion-label {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    min-width: 0;
}

.paydate-accordion-badge {
    color: var(--brand);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.paydate-accordion-summary {
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
}

.paydate-accordion-chevron {
    color: var(--brand);
    flex-shrink: 0;
    font-size: 12px;
    transition: transform 0.2s ease;
}

.paydate-accordion-item.open .paydate-accordion-chevron {
    transform: rotate(180deg);
}

.paydate-accordion-remove {
    flex-shrink: 0;
    font-size: 13px;
    margin-right: 12px;
    padding: 6px 10px;
}

.paydate-accordion-body {
    border-top: 1px solid var(--line);
    display: none;
    padding: 16px;
}

.paydate-accordion-item.open .paydate-accordion-body {
    display: block;
}

.paydate-panel {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-top: 14px;
    padding: 16px;
}

.paydate-panel-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 14px;
}

.paydate-panel-head h3 {
    font-size: 16px;
    margin: 0;
}

.add-info-block {
    border-top: 1px solid var(--line);
    margin-top: 14px;
    padding-top: 14px;
}

.add-info-block-head h4 {
    color: var(--muted);
    font-size: 13px;
    letter-spacing: 0.04em;
    margin: 0 0 10px;
    text-transform: uppercase;
}

.add-info-list {
    display: grid;
    gap: 12px;
    margin-bottom: 12px;
}

.add-info-row {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
}

.add-info-row-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.add-info-row-head strong {
    color: var(--brand-dark);
    font-size: 13px;
}

.company-policy-block {
    margin-top: 0;
}

.company-policy-row strong {
    color: var(--ink);
}

.btn-text-danger {
    background: transparent;
    border: 0;
    color: var(--danger);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 0;
}

.btn-add-info {
    font-size: 14px;
    padding: 10px 18px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.btn {
    align-items: center;
    background: var(--brand);
    border: 0;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    gap: 8px;
    justify-content: center;
    letter-spacing: 0.01em;
    padding: 12px 24px;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

a.btn,
a.btn:link,
a.btn:visited {
    color: #fff;
}

.btn:hover,
.btn:focus-visible,
a.btn:hover,
a.btn:focus-visible,
a.btn:active {
    background: var(--brand-dark);
    color: #fff;
}

.btn:focus-visible {
    box-shadow: 0 0 0 3px var(--focus-ring);
    outline: none;
}

.btn-secondary {
    background: #eef2f7;
    color: var(--ink);
}

a.btn-secondary,
a.btn-secondary:link,
a.btn-secondary:visited {
    color: var(--ink);
}

.btn-secondary:hover,
a.btn-secondary:hover,
a.btn-secondary:focus-visible {
    background: #e2e8f0;
    color: var(--ink);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--brand);
    color: var(--brand);
}

a.btn-outline,
a.btn-outline:link,
a.btn-outline:visited {
    color: var(--brand);
}

.btn-outline:hover,
.btn-outline:focus-visible,
a.btn-outline:hover,
a.btn-outline:focus-visible,
a.btn-outline:active {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
    color: #fff;
}

.btn-block {
    width: 100%;
}

.preview-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.preview-card-head {
    background: var(--brand);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    padding: 14px 18px;
}

.preview-card-body {
    padding: 18px;
}

.stub-preview-carousel {
    margin-bottom: 4px;
}

.stub-preview-controls {
    align-items: center;
    display: none;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 10px;
}

.stub-preview-carousel.has-multiple .stub-preview-controls {
    display: flex;
}

.stub-preview-counter {
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
    margin: 0;
    text-align: center;
}

.stub-preview-nav {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink);
    cursor: pointer;
    flex-shrink: 0;
    font-size: 28px;
    height: 40px;
    line-height: 1;
    width: 40px;
}

.stub-preview-nav:disabled {
    cursor: not-allowed;
    opacity: 0.4;
}

.stub-preview-viewport {
    overflow: hidden;
    width: 100%;
}

.stub-preview-track {
    display: flex;
    transition: transform 0.28s ease;
    width: 100%;
}

.stub-preview-slide {
    flex: 0 0 100%;
    min-width: 100%;
}

.stub-preview-frame-wrap {
    background: #eef2f7;
    border: 1px solid var(--line);
    border-radius: 12px;
    min-height: 220px;
    overflow: visible;
    position: relative;
    width: 100%;
}

.stub-preview-image {
    display: none;
    height: auto;
    max-width: 100%;
    width: 100%;
}

.stub-preview-image.is-visible {
    cursor: zoom-in;
    display: block;
}

.stub-preview-html-scale {
    overflow: hidden;
    position: relative;
    width: 100%;
}

.stub-preview-html-frame {
    background: #fff;
    border: 0;
    display: block;
    max-width: none;
    pointer-events: none;
    transform-origin: top left;
}

.stub-preview-lightbox-hint {
    margin-top: 10px;
}

.stub-preview-placeholder {
    align-items: center;
    color: var(--muted);
    display: flex;
    font-size: 14px;
    inset: 0;
    justify-content: center;
    padding: 24px;
    position: absolute;
    text-align: center;
}

.stub-preview-loading {
    align-items: center;
    background: rgba(248, 250, 252, 0.92);
    display: flex;
    inset: 0;
    justify-content: center;
    position: absolute;
    z-index: 2;
}

.stub-preview-loading.hidden {
    display: none;
}

.stub-preview-loading-card {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 12px;
    justify-items: center;
    min-width: 220px;
    padding: 22px 24px;
    text-align: center;
}

.stub-preview-spinner {
    animation: stub-preview-spin 0.8s linear infinite;
    border: 3px solid #dbe4f0;
    border-radius: 50%;
    border-top-color: var(--brand);
    height: 34px;
    width: 34px;
}

.stub-preview-loading-text {
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

@keyframes stub-preview-spin {
    to {
        transform: rotate(360deg);
    }
}

.stub-preview-placeholder.hidden {
    display: none;
}

.template-label {
    color: var(--muted);
    font-size: 13px;
    margin: 14px 0 0;
}

.template-picker-row {
    align-items: flex-end;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-top: 14px;
}

.template-picker-current {
    min-width: 0;
}

.template-current-name {
    font-size: 15px;
    font-weight: 700;
    margin: 4px 0 0;
}

.template-change-btn {
    border-radius: 999px;
    flex-shrink: 0;
    font-size: 14px;
    padding: 10px 18px;
}

.template-sample-pdf-row {
    margin-top: 10px;
}

.template-sample-pdf-btn {
    border-radius: 999px;
    font-size: 14px;
    padding: 10px 18px;
    width: 100%;
}

.template-modal {
    inset: 0;
    position: fixed;
    z-index: 1000;
}

.template-modal[hidden] {
    display: none;
}

body.modal-open {
    overflow: hidden;
}

.template-modal-backdrop {
    background: rgba(15, 23, 42, 0.55);
    inset: 0;
    position: absolute;
}

.template-modal-dialog {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
    display: grid;
    gap: 16px;
    left: 50%;
    max-height: calc(100vh - 40px);
    max-width: 920px;
    overflow-y: auto;
    padding: 20px;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 32px);
}

.template-modal-header {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.template-modal-header h2 {
    font-size: 20px;
    margin: 0;
}

.template-modal-close {
    background: transparent;
    border: 0;
    color: var(--muted);
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
    padding: 4px 8px;
}

.template-modal-carousel {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: auto 1fr auto;
}

.template-carousel-nav {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink);
    cursor: pointer;
    font-size: 28px;
    height: 44px;
    line-height: 1;
    width: 44px;
}

.template-carousel-nav:disabled {
    cursor: not-allowed;
    opacity: 0.4;
}

.template-modal-viewport {
    overflow: hidden;
    transition: height 0.28s ease;
    width: 100%;
}

.template-modal-track {
    display: flex;
    transition: transform 0.28s ease;
    width: 100%;
}

.template-modal-slide {
    flex: 0 0 100%;
    min-width: 100%;
    padding: 0 4px;
}

.template-modal-slide-label {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 10px;
    text-align: center;
}

.template-modal-frame-wrap {
    background: #eef2f7;
    border: 1px solid var(--line);
    border-radius: 12px;
    min-height: 220px;
    overflow: visible;
    position: relative;
    width: 100%;
}

.template-modal-image {
    display: none;
    height: auto;
    max-width: 100%;
    width: 100%;
}

.template-modal-image.is-visible {
    display: block;
}

.template-modal-loading {
    align-items: center;
    color: var(--muted);
    display: flex;
    font-size: 14px;
    inset: 0;
    justify-content: center;
    position: absolute;
}

.template-modal-loading.hidden {
    display: none;
}

.template-modal-footer {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.template-modal-counter {
    color: var(--muted);
    font-size: 14px;
    margin: 0;
}

.template-modal-footer .btn {
    margin-left: auto;
}

.color-picker-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr;
    margin-top: 8px;
}

.color-picker-field > span {
    color: var(--muted);
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
}

.color-picker-note {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
    margin: 0 0 8px;
}

.color-picker-control {
    align-items: center;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 10px;
    display: flex;
    gap: 10px;
    padding: 8px 10px;
}

.color-picker-control input[type="color"] {
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
    height: 36px;
    padding: 2px;
    width: 44px;
}

.color-hex-input {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    flex: 1;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    letter-spacing: 0.04em;
    min-width: 0;
    padding: 8px 10px;
    text-transform: uppercase;
}

.color-swatch-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.color-swatch {
    background: var(--swatch-color, #0066cc);
    border: 1px solid rgba(15, 23, 42, 0.18);
    border-radius: 6px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
    cursor: pointer;
    flex: 0 0 24px;
    height: 24px;
    padding: 0;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    width: 24px;
}

.color-swatch:hover {
    transform: scale(1.08);
}

.color-swatch.selected {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--brand);
}

.color-swatch:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.results-section {
    margin-top: 24px;
    grid-column: 1 / -1;
}

.status {
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 14px;
    padding: 10px 12px;
}

.status.error {
    background: #fee4e2;
    color: var(--danger);
}

.status.warning {
    background: #fef3c7;
    color: #92400e;
}

.status.success {
    background: #ecfdf3;
    color: var(--success);
}

.results-table-wrap {
    overflow: auto;
}

table.results {
    border-collapse: collapse;
    font-size: 13px;
    min-width: 640px;
    width: 100%;
}

table.results th,
table.results td {
    border-bottom: 1px solid var(--line);
    padding: 8px 10px;
    text-align: left;
}

table.results th {
    background: #f8fafc;
    font-size: 11px;
    text-transform: uppercase;
}

.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.tab {
    background: #eef2f7;
    border: 0;
    border-radius: 999px;
    color: var(--ink);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 14px;
}

.tab.active {
    background: var(--brand);
    color: #fff;
}

pre.json-output {
    background: #101828;
    border-radius: 10px;
    color: #d1e7ff;
    font-size: 11px;
    max-height: 320px;
    overflow: auto;
    padding: 12px;
}

.hidden {
    display: none !important;
}

.site-footer {
    background:
        radial-gradient(ellipse 70% 80% at 85% 0%, rgba(var(--brand-rgb), 0.18), transparent 50%),
        #0b1220;
    color: #cbd5e1;
    margin-top: 40px;
    padding: 40px 20px;
}

.footer-inner {
    display: grid;
    gap: 28px;
    margin: 0 auto;
    max-width: 1280px;
}

.footer-columns {
    display: grid;
    gap: 32px;
    grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr));
}

.footer-brand strong {
    color: #fff;
    display: block;
    font-size: 18px;
    margin: 8px 0;
}

.footer-brand p {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.footer-col-title {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin: 0 0 14px;
    text-transform: uppercase;
}

.footer-col-title-link {
    color: inherit;
    text-decoration: none;
}

.footer-col-title-link:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: #cbd5e1;
}

.footer-copy {
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    color: #94a3b8;
    font-size: 13px;
    margin: 0;
    padding-top: 24px;
}

.state-fields-section {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-top: 18px;
    padding: 16px;
}

.state-fields-section.is-loading {
    opacity: 0.72;
}

.state-fields-section.is-loading #state-fields-container::before {
    color: var(--muted);
    content: 'Loading state withholding fields…';
    display: block;
    font-size: 14px;
    grid-column: 1 / -1;
}

.state-fields-heading {
    font-size: 15px;
    margin: 0 0 8px;
}

.state-field-empty {
    color: var(--muted);
    font-size: 14px;
    grid-column: 1 / -1;
    margin: 0;
}

@media (max-width: 1024px) {
    .layout-grid {
        grid-template-columns: 1fr;
    }

    .form-column,
    .preview-column {
        grid-column: auto;
    }

    .preview-column {
        position: static;
    }

    .footer-columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .header-inner {
        gap: 0;
        padding: 12px 16px 0;
    }

    .header-cta--desktop {
        display: none;
    }

    .header-auth--desktop {
        display: none;
    }

    .header-auth--mobile {
        display: block;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .main-nav {
        background: var(--surface);
        border-top: 1px solid var(--line);
        display: none;
        flex-direction: column;
        gap: 0;
        margin-top: 12px;
        padding: 8px 0 16px;
        width: 100%;
    }

    .main-nav a {
        border-top: 1px solid var(--line);
        font-size: 15px;
        padding: 12px 16px;
    }

    .main-nav a.active {
        background: var(--brand-light);
        color: var(--brand);
    }

    .main-nav-logout {
        border-top: 1px solid var(--line);
        margin: 0;
    }

    .main-nav-logout button {
        background: transparent;
        border: 0;
        color: #b42318;
        cursor: pointer;
        display: block;
        font: inherit;
        font-size: 15px;
        font-weight: 600;
        padding: 12px 16px;
        text-align: left;
        width: 100%;
    }

    .header-cta--mobile {
        display: inline-flex;
        margin: 8px 16px 0;
        width: calc(100% - 32px);
    }

    .site-header.nav-open .main-nav {
        display: flex;
    }
}

@media (min-width: 720px) {
    .grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

/* Paystub create form: keep the mobile single-column field layout on all breakpoints. */
.paystub-form .field-stack,
.paystub-form .grid-2,
.paystub-form .grid-3,
.paystub-form .grid-auto {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
}

@media (min-width: 720px) {
    .paystub-form .grid-2,
    .paystub-form .grid-auto {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 1024px) {
    .paystub-form .grid-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .page-shell {
        padding: 20px 16px 60px;
    }

    .footer-columns {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-brand {
        grid-column: auto;
    }
}

.address-autocomplete-wrap {
    position: relative;
}

.address-autocomplete-suggestions {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow);
    left: 0;
    list-style: none;
    margin: 6px 0 0;
    max-height: 240px;
    overflow-y: auto;
    padding: 6px 0;
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 30;
}

.address-autocomplete-item {
    color: var(--ink);
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
    padding: 10px 14px;
}

.address-autocomplete-item:hover,
.address-autocomplete-item:focus {
    background: var(--brand-light);
}

/* Marketing pages */
.landing-hero {
    margin-bottom: 40px;
    padding: 12px 0 8px;
    text-align: center;
}

.landing-hero--split {
    align-items: center;
    display: grid;
    gap: 36px;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    padding: 28px 0 20px;
    text-align: left;
}

.landing-hero-copy {
    min-width: 0;
}

.landing-hero-brand {
    color: var(--ink);
    font-size: clamp(22px, 3vw, 28px);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 0 8px;
}

.landing-hero-kicker {
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin: 0 0 12px;
    text-transform: uppercase;
}

.landing-hero-copy h1 {
    color: var(--ink);
    font-size: clamp(30px, 4.2vw, 44px);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.12;
    margin: 0 0 14px;
}

.landing-hero-lead {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.65;
    margin: 0;
    max-width: 36rem;
}

.landing-hero--split .landing-hero-actions {
    justify-content: flex-start;
    margin-top: 22px;
}

.landing-hero--split .landing-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
}

.landing-hero--split .landing-hero-meta li {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: var(--shadow);
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    padding: 7px 12px;
}

.landing-hero-visual {
    min-width: 0;
    position: relative;
}

.hero-doc-stack {
    margin: 0 auto;
    max-width: 420px;
    min-height: 380px;
    position: relative;
    width: 100%;
}

.hero-doc-frame {
    max-width: 100%;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hero-doc-frame--front {
    position: relative;
    z-index: 2;
}

.hero-doc-frame--back {
    left: 18%;
    max-width: 78%;
    opacity: 0.92;
    position: absolute;
    top: 12%;
    transform: rotate(4deg) scale(0.94);
    z-index: 1;
}

.hero-doc-stack:hover .hero-doc-frame--front {
    transform: translateY(-4px);
}

.hero-doc-stack:hover .hero-doc-frame--back {
    transform: rotate(6deg) scale(0.95) translate(4px, -2px);
}

.page-shell--home {
    padding-top: 12px;
}

.landing-hero .page-title {
    margin-bottom: 16px;
}

.landing-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

@media (max-width: 900px) {
    .landing-hero--split {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .landing-hero-lead {
        margin-left: auto;
        margin-right: auto;
    }

    .landing-hero--split .landing-hero-actions,
    .landing-hero--split .landing-hero-meta {
        justify-content: center;
    }

    .hero-doc-stack {
        min-height: 320px;
    }
}

.landing-section {
    margin-bottom: 48px;
}

.landing-section-head {
    margin-bottom: 24px;
    text-align: center;
}

.landing-section-head h2 {
    color: var(--ink);
    font-size: clamp(22px, 3vw, 28px);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
}

.landing-section-head p {
    color: var(--muted);
    font-size: 16px;
    margin: 0 auto;
    max-width: 640px;
}

.landing-trust-bar {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-wrap: wrap;
    gap: 20px 32px;
    justify-content: center;
    margin-bottom: 48px;
    padding: 18px 24px;
}

.landing-trust-item {
    align-items: center;
    color: var(--muted);
    display: flex;
    font-size: 14px;
    font-weight: 600;
    gap: 8px;
}

.landing-trust-item strong {
    color: var(--ink);
}

.landing-grid-2 {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.landing-faq-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.landing-faq-grid .collapsible {
    margin-top: 0;
}

.landing-faq-grid .collapsible-body p {
    color: var(--muted);
    font-size: 15px;
    margin: 0;
}

.landing-faq-grid .collapsible-toggle {
    text-align: left;
    touch-action: manipulation;
}

.landing-grid-3 {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.landing-grid-4 {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.landing-feature-card .section-body p,
.landing-industry-card .section-body p,
.landing-value-card .section-body p,
.landing-blog-card .section-body p {
    color: var(--muted);
    font-size: 15px;
    margin: 0;
}

.landing-feature-card .section-body p + p,
.landing-blog-card .section-body p + p {
    margin-top: 12px;
}

.landing-stat-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.landing-stat {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px 18px;
    text-align: center;
}

.landing-stat strong {
    color: var(--brand);
    display: block;
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 6px;
}

.landing-stat span {
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

.landing-testimonial {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: grid;
    gap: 16px;
    padding: 22px;
}

.landing-testimonial-quote {
    color: var(--ink);
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

.landing-testimonial-author {
    align-items: center;
    display: flex;
    gap: 12px;
}

.landing-testimonial-avatar {
    align-items: center;
    background: var(--brand-light);
    border-radius: 10px;
    color: var(--brand);
    display: flex;
    font-size: 18px;
    font-weight: 800;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.landing-testimonial-author strong {
    display: block;
    font-size: 14px;
}

.landing-testimonial-author span {
    color: var(--muted);
    font-size: 13px;
}

.landing-preview-wrap {
    align-items: start;
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.landing-product-mock {
    background: #eef2f7;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
    min-height: 300px;
    padding: 20px;
}

.landing-product-mock table {
    background: #fff;
    border-collapse: collapse;
    border-radius: 8px;
    font-size: 12px;
    margin-top: 12px;
    overflow: hidden;
    width: 100%;
}

.landing-product-mock th,
.landing-product-mock td {
    border-bottom: 1px solid var(--line);
    padding: 8px 10px;
    text-align: left;
}

.landing-product-mock th {
    background: #f8fafc;
    color: var(--ink);
    font-weight: 700;
}

.landing-cta-band {
    background:
        radial-gradient(ellipse 80% 120% at 10% 0%, rgba(var(--brand-rgb), 0.28), transparent 55%),
        linear-gradient(135deg, #0f172a 0%, #134e4a 55%, #065f46 100%);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 0;
    padding: 40px 32px;
    text-align: center;
}

.landing-cta-band h2 {
    color: #fff;
    font-size: clamp(22px, 3vw, 28px);
    margin: 0 0 10px;
}

.landing-cta-band p {
    color: #cbd5e1;
    font-size: 16px;
    margin: 0 auto 24px;
    max-width: 520px;
}

.landing-cta-band .landing-hero-actions {
    margin-top: 0;
}

.landing-cta-band .btn-outline {
    border-color: #fff;
    color: #fff;
}

.landing-cta-band .btn-outline:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.landing-video {
    margin: 0 auto;
    max-width: min(960px, 100%);
    width: 100%;
}

.landing-video-frame {
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    background: #0a2540;
    border-radius: var(--radius);
    box-shadow: 0 18px 48px rgba(10, 37, 64, 0.18);
    overflow: hidden;
    line-height: 0;
}

.landing-video-frame video {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    border: 0;
    object-fit: cover;
    object-position: center;
    background: #0a2540;
}

.landing-video-caption {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
    margin: 14px 0 0;
    text-align: center;
}

.landing-video-caption a {
    color: var(--ink);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.landing-blog-card .section-head h2 {
    font-size: 18px;
}

.landing-blog-meta {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
}

.landing-doc-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.landing-doc-card .section-head {
    align-items: flex-start;
}

.landing-doc-card .section-head h2 {
    font-size: 20px;
    margin-top: 4px;
}

.landing-doc-category {
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin: 0;
    text-transform: uppercase;
}

.landing-doc-card .section-body p {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

.landing-doc-price {
    color: var(--ink);
    font-size: 15px;
    font-weight: 700;
    margin-top: 14px !important;
}

.landing-doc-price--free {
    color: var(--brand);
}

.landing-doc-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.landing-doc-card--free {
    border-color: rgba(var(--brand-rgb), 0.28);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 0 0 1px rgba(var(--brand-rgb), 0.06);
}

.landing-doc-card .section-body {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.landing-doc-cta {
    display: inline-flex;
    justify-content: center;
    margin-top: auto;
    padding-top: 16px;
    width: 100%;
}

.landing-trust-bar--home {
    gap: 16px 28px;
}

@media (max-width: 1024px) {
    .landing-doc-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .landing-doc-grid {
        grid-template-columns: 1fr;
    }
}

.landing-states-nav {
    background: var(--surface, #fff);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 20px 22px;
}

.landing-states-list {
    display: grid;
    gap: 8px 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}

.landing-states-list a {
    align-items: center;
    color: var(--brand-dark, #1b7a3f);
    display: flex;
    font-size: 14px;
    font-weight: 600;
    gap: 8px;
    line-height: 1.4;
    padding: 6px 0;
    text-decoration: none;
}

.landing-states-list a:hover,
.landing-states-list a:focus-visible {
    color: var(--brand, #047857);
    text-decoration: underline;
}

.state-landing-flag {
    border: 1px solid var(--line, #d7e0ea);
    border-radius: 3px;
    display: block;
    flex-shrink: 0;
    height: 19px;
    object-fit: cover;
    width: 28px;
}

.state-landing-flag--hero {
    height: 40px;
    width: 60px;
}

.state-flag-fallback {
    align-items: center;
    background: var(--brand-dark, #1b7a3f);
    border-radius: 4px;
    color: #fff;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    height: 40px;
    justify-content: center;
    letter-spacing: 0.04em;
    min-width: 60px;
    padding: 0 8px;
}

.state-flag-fallback--sm {
    font-size: 10px;
    height: 19px;
    min-width: 28px;
    padding: 0 4px;
}

.state-landing-title-row {
    align-items: center;
    display: flex;
    gap: 14px;
    margin-bottom: 8px;
}

.state-landing-title-row h1 {
    margin: 0;
}

.state-landing-sample {
    align-self: start;
}

.state-landing-sample-placeholder {
    align-items: center;
    background: linear-gradient(160deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px dashed var(--line, #cbd5e1);
    border-radius: 8px;
    color: var(--muted, #64748b);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 220px;
    padding: 24px 20px;
    text-align: center;
}

/* display:flex above must not override the hidden attribute */
.state-landing-sample-placeholder[hidden] {
    display: none !important;
}

.state-landing-sample .landing-sample-img:not([hidden]),
.landing-sample-zoomable .landing-sample-img,
.landing-sample-zoomable [data-sample-lightbox-image],
[data-sample-lightbox-image],
[data-state-sample-image] {
    -webkit-tap-highlight-color: transparent;
    cursor: zoom-in;
    touch-action: manipulation;
}

.landing-sample-zoomable,
.state-landing-sample,
.form1099-doc-frame.landing-sample-zoomable {
    touch-action: manipulation;
}

.state-landing-sample-hint {
    color: var(--muted, #5b6b7c);
    font-size: 12px;
    font-weight: 600;
    margin: 8px 0 0;
    text-align: center;
}

.state-sample-lightbox {
    inset: 0;
    position: fixed;
    z-index: 10050;
}

.state-sample-lightbox[hidden] {
    display: none !important;
}

.state-sample-lightbox-backdrop {
    background: rgba(8, 15, 28, 0.92);
    inset: 0;
    position: absolute;
}

.state-sample-lightbox-dialog {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    height: 100%;
    height: 100dvh;
    inset: 0;
    padding:
        max(12px, env(safe-area-inset-top, 0px))
        max(12px, env(safe-area-inset-right, 0px))
        max(12px, env(safe-area-inset-bottom, 0px))
        max(12px, env(safe-area-inset-left, 0px));
    position: absolute;
    width: 100%;
}

.state-sample-lightbox-header {
    align-items: center;
    background: rgba(8, 15, 28, 0.92);
    display: flex;
    flex-shrink: 0;
    gap: 12px;
    justify-content: space-between;
    margin: 0 0 8px;
    padding: 4px 0 10px;
    position: sticky;
    top: 0;
    z-index: 2;
}

.state-sample-lightbox-title {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.state-sample-lightbox-close {
    align-items: center;
    background: #fff;
    border: 0;
    border-radius: 999px;
    color: #0f172a;
    cursor: pointer;
    display: inline-flex;
    flex-shrink: 0;
    font-size: 16px;
    font-weight: 700;
    gap: 6px;
    height: 44px;
    justify-content: center;
    line-height: 1;
    min-width: 44px;
    padding: 0 14px;
    -webkit-tap-highlight-color: transparent;
}

.state-sample-lightbox-close-icon {
    font-size: 26px;
    font-weight: 500;
    line-height: 1;
}

.state-sample-lightbox-close-label {
    font-size: 14px;
    font-weight: 700;
}

.state-sample-lightbox-close:hover,
.state-sample-lightbox-close:focus-visible {
    background: #e2e8f0;
    outline: none;
}

/* Always-visible floating close for mobile (header can feel “lost” under tall stubs). */
.state-sample-lightbox-close--fab {
    bottom: max(16px, env(safe-area-inset-bottom, 0px));
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
    display: none;
    left: 50%;
    position: fixed;
    right: auto;
    top: auto;
    transform: translateX(-50%);
    z-index: 3;
}

.state-sample-lightbox-close:active {
    transform: scale(0.98);
}

.state-sample-lightbox-close--fab:active {
    transform: translateX(-50%) scale(0.98);
}

.state-sample-lightbox-body {
    align-items: flex-start;
    display: flex;
    flex: 1;
    justify-content: center;
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.state-sample-lightbox-body img {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
    display: block;
    height: auto;
    margin: 0 auto;
    max-height: none;
    max-width: min(1100px, 100%);
    object-fit: contain;
    width: auto;
}

@media (max-width: 720px) {
    .state-sample-lightbox-close--fab {
        display: inline-flex;
    }

    .state-sample-lightbox-header .state-sample-lightbox-close {
        padding: 0 12px;
    }

    .state-sample-lightbox-body {
        padding-bottom: 72px;
    }
}

.state-landing-highlights {
    background: var(--surface, #fff);
    border: 1px solid var(--line);
    border-radius: 16px;
    display: grid;
    gap: 10px 24px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    list-style: none;
    margin: 0;
    padding: 22px 26px;
}

.state-landing-highlights li {
    padding-left: 1.1em;
    position: relative;
}

.state-landing-highlights li::before {
    color: var(--brand, #047857);
    content: "✓";
    font-weight: 700;
    left: 0;
    position: absolute;
}

.state-landing-steps {
    margin: 0 0 16px;
    padding-left: 1.2em;
}

.state-landing-steps li + li {
    margin-top: 8px;
}

.state-landing-inline-cta {
    margin: 16px 0 0;
}

.state-landing-faq {
    display: grid;
    gap: 12px;
}

.state-landing-faq-item {
    background: var(--surface, #fff);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    padding: 0;
}

.state-landing-faq-item summary {
    color: var(--ink);
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
    list-style: none;
    padding: 16px 44px 16px 18px;
    position: relative;
}

.state-landing-faq-item summary::-webkit-details-marker {
    display: none;
}

.state-landing-faq-item summary::after {
    color: var(--muted);
    content: "+";
    font-size: 18px;
    font-weight: 500;
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
}

.state-landing-faq-item[open] summary::after {
    content: "−";
}

.state-landing-faq-item summary:hover {
    background: #f8fafc;
}

.state-landing-faq-item p {
    border-top: 1px solid var(--line);
    color: var(--muted, #5b6b7c);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    padding: 14px 18px 16px;
}

@media (max-width: 720px) {
    .state-landing-highlights {
        grid-template-columns: 1fr;
    }

    .state-landing-title-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }
}

.state-index-hero .form1099-hero-copy {
    max-width: 44rem;
}

.state-index-controls {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
}

.state-index-search input {
    background: var(--surface, #fff);
    border: 1px solid var(--line, #d7e0ea);
    border-radius: 12px;
    font: inherit;
    padding: 12px 14px;
    width: 100%;
}

.state-index-search input:focus {
    border-color: var(--brand, #047857);
    outline: 2px solid rgba(var(--brand-rgb), 0.2);
    outline-offset: 1px;
}

.state-index-letters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.state-index-letter {
    background: var(--surface, #fff);
    border: 1px solid var(--line, #d7e0ea);
    border-radius: 8px;
    color: var(--brand-dark, #1b7a3f);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    min-width: 34px;
    padding: 8px 10px;
}

.state-index-letter:hover,
.state-index-letter:focus-visible {
    border-color: var(--brand, #047857);
}

.state-index-letter.is-active {
    background: var(--brand-dark, #1b7a3f);
    border-color: var(--brand-dark, #1b7a3f);
    color: #fff;
}

.state-index-grid a {
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 8px 10px;
}

.state-index-grid a:hover,
.state-index-grid a:focus-visible {
    background: #f3faf6;
    border-color: #cfe8d8;
    text-decoration: none;
}

.state-index-chevron {
    color: var(--muted, #5b6b7c);
    font-size: 18px;
    font-weight: 400;
    margin-left: auto;
}

.state-index-empty {
    color: var(--muted, #5b6b7c);
    margin: 0 0 12px;
}

.visually-hidden {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

@media (max-width: 1024px) {
    .landing-states-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .landing-states-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 420px) {
    .landing-states-list {
        grid-template-columns: 1fr;
    }
}

.landing-timeline {
    display: grid;
    gap: 0;
}

.landing-timeline-item {
    display: grid;
    gap: 16px;
    grid-template-columns: 88px 1fr;
    padding-bottom: 28px;
    position: relative;
}

.landing-timeline-item::before {
    background: var(--line);
    content: "";
    height: calc(100% - 8px);
    left: 43px;
    position: absolute;
    top: 8px;
    width: 2px;
}

.landing-timeline-item:last-child {
    padding-bottom: 0;
}

.landing-timeline-item:last-child::before {
    display: none;
}

.landing-timeline-year {
    background: var(--brand-light);
    border-radius: 10px;
    color: var(--brand-dark);
    font-size: 14px;
    font-weight: 800;
    height: fit-content;
    padding: 8px 10px;
    position: relative;
    text-align: center;
    z-index: 1;
}

.landing-timeline-content {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 20px;
}

.landing-timeline-content h3 {
    font-size: 17px;
    margin: 0 0 6px;
}

.landing-timeline-content p {
    color: var(--muted);
    font-size: 15px;
    margin: 0;
}

.landing-contact-list {
    display: grid;
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.landing-contact-list li {
    align-items: flex-start;
    display: flex;
    font-size: 15px;
    gap: 12px;
}

.landing-contact-list strong {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
}

.landing-contact-list span {
    color: var(--muted);
    font-size: 14px;
}

.landing-contact-icon {
    align-items: center;
    background: var(--brand-light);
    border-radius: 10px;
    color: var(--brand);
    display: flex;
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 700;
    height: 40px;
    justify-content: center;
    letter-spacing: 0.02em;
    line-height: 1;
    text-transform: uppercase;
    width: 40px;
}

.landing-map-placeholder {
    align-items: center;
    background: #eef2f7;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius);
    color: var(--muted);
    display: flex;
    flex-direction: column;
    font-size: 15px;
    gap: 8px;
    justify-content: center;
    min-height: 280px;
    padding: 24px;
    text-align: center;
}

.landing-map-placeholder strong {
    color: var(--ink);
    font-size: 16px;
}

.landing-hours-grid {
    display: grid;
    gap: 10px;
}

.landing-hours-row {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: flex;
    font-size: 15px;
    justify-content: space-between;
    padding: 10px 0;
}

.landing-hours-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.landing-hours-row span:last-child {
    color: var(--muted);
    font-weight: 600;
}

.landing-pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.landing-pill {
    background: var(--brand-light);
    border: 1px solid rgba(var(--brand-rgb), 0.25);
    border-radius: 999px;
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 700;
    padding: 8px 14px;
}

@media (max-width: 1024px) {
    .landing-grid-3,
    .landing-grid-4,
    .landing-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .landing-preview-wrap {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .landing-grid-2,
    .landing-grid-3,
    .landing-grid-4,
    .landing-faq-grid,
    .landing-stat-grid {
        grid-template-columns: 1fr;
    }

    .landing-timeline-item {
        grid-template-columns: 72px 1fr;
    }

    .landing-timeline-item::before {
        left: 35px;
    }

    .landing-hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .landing-hero-actions .btn {
        width: 100%;
        text-align: center;
    }

    .landing-trust-bar {
        display: grid;
        gap: 12px 16px;
        grid-template-columns: 1fr;
        justify-items: start;
        padding: 14px 16px;
    }

    .landing-cta-band {
        padding: 28px 18px;
        border-radius: 14px;
    }

    .landing-section {
        margin-bottom: 36px;
    }

    .landing-section-head {
        text-align: left;
    }

    .landing-section-head p {
        margin-left: 0;
        margin-right: 0;
        max-width: none;
    }
}

@media (min-width: 480px) and (max-width: 720px) {
    .landing-trust-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* 1099 landing / hub / create */
.form1099-hero {
    align-items: center;
    display: grid;
    gap: 40px;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    margin-bottom: 40px;
    max-width: 100%;
    min-width: 0;
    padding: 8px 0 12px;
    width: 100%;
}

.form1099-kicker {
    align-items: center;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 13px;
    font-weight: 600;
    gap: 8px;
    letter-spacing: 0.02em;
    margin: 0 0 14px;
}

.form1099-kicker a {
    color: var(--brand);
    text-decoration: none;
}

.form1099-kicker a:hover {
    text-decoration: underline;
}

.form1099-hero-copy h1 {
    color: var(--ink);
    font-size: clamp(30px, 4vw, 42px);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.15;
    margin: 0 0 14px;
}

.form1099-lead {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.65;
    margin: 0;
    max-width: 34rem;
}

.state-landing-lead,
.state-index-lead {
    max-width: 38rem;
}

.form1099-hero-actions {
    justify-content: flex-start;
    margin-top: 24px;
}

.form1099-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    margin: 22px 0 0;
    padding: 0;
}

.form1099-hero-meta li {
    background: var(--brand-light);
    border: 1px solid rgba(var(--brand-rgb), 0.22);
    border-radius: 999px;
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 600;
    padding: 7px 12px;
}

.form1099-hero-copy {
    min-width: 0;
    max-width: 100%;
}

.form1099-hero-visual {
    align-items: flex-start;
    display: flex;
    justify-content: center;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    width: 100%;
}

.form1099-doc-frame {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.05),
        0 12px 28px rgba(15, 23, 42, 0.08);
    box-sizing: border-box;
    margin: 0 auto;
    max-width: min(430px, 100%);
    min-width: 0;
    overflow: hidden;
    padding: 36px 14px 12px;
    position: relative;
    width: 100%;
}

/* Browser chrome bar */
.form1099-doc-frame::before {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid var(--line);
    content: "";
    height: 28px;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

/* Window traffic lights */
.form1099-doc-frame::after {
    background:
        radial-gradient(circle, #f87171 0 3.5px, transparent 4px) 0 0 / 12px 12px no-repeat,
        radial-gradient(circle, #fbbf24 0 3.5px, transparent 4px) 16px 0 / 12px 12px no-repeat,
        radial-gradient(circle, #34d399 0 3.5px, transparent 4px) 32px 0 / 12px 12px no-repeat;
    content: "";
    height: 12px;
    left: 12px;
    pointer-events: none;
    position: absolute;
    top: 8px;
    width: 48px;
    z-index: 1;
}

.form1099-doc-frame img,
img.landing-sample-img {
    background: #fff;
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    box-sizing: border-box;
    display: block;
    height: auto !important;
    max-width: 100% !important;
    object-fit: contain;
    object-position: top center;
    width: 100% !important;
}

.form1099-doc-frame figcaption {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    margin-top: 12px;
    text-align: center;
}

.form1099-detail-grid {
    align-items: stretch;
}

.form1099-hub-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.form1099-hub-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.form1099-hub-card:hover {
    border-color: rgba(var(--brand-rgb), 0.35);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}

.form1099-hub-card-link {
    color: inherit;
    display: flex;
    flex: 1;
    flex-direction: column;
    text-decoration: none;
}

.form1099-hub-thumb {
    background:
        linear-gradient(180deg, rgba(var(--brand-rgb), 0.06), rgba(248, 250, 252, 0.9)),
        #f8fafc;
    border-bottom: 1px solid var(--line);
    min-width: 0;
    overflow: hidden;
    padding: 16px 16px 0;
    touch-action: manipulation;
}

.form1099-hub-thumb .state-landing-sample-hint {
    margin: 8px 0 12px;
}

.form1099-hub-thumb img {
    aspect-ratio: 320 / 414;
    background: #fff;
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    cursor: zoom-in;
    display: block;
    height: auto;
    max-width: 100%;
    object-fit: cover;
    object-position: top center;
    touch-action: manipulation;
    width: 100%;
}

.form1099-hub-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    padding: 18px 18px 20px;
}

.form1099-hub-body h2 {
    font-size: 20px;
    margin: 0;
}

.form1099-hub-body p:not(.landing-doc-category) {
    color: var(--muted);
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.form1099-hub-cta {
    color: var(--brand);
    font-size: 14px;
    font-weight: 700;
    margin-top: 6px;
}

.form1099-preview-wrap {
    background: #525659;
    min-height: 720px;
    overflow: hidden;
    position: relative;
}

/* Use the same .layout-grid / .form-column / .preview-column widths as paystub. */

.form1099-preview-frame {
    background: #525659;
    border: 0;
    display: block;
    height: 780px;
    min-height: 720px;
    width: 100%;
}

.form1099-preview-frame.hidden,
.form1099-preview-toolbar.hidden {
    display: none;
}

.form1099-preview-wrap .stub-preview-placeholder {
    color: #d1e7ff;
}

.field.is-invalid input,
.field.is-invalid select,
.field input.is-invalid,
.field select.is-invalid {
    border-color: var(--danger, #991b1b);
    box-shadow: 0 0 0 3px rgba(153, 27, 27, 0.15);
}

#form1099-status.status {
    margin-top: 12px;
}

.form1099-preview-link {
    color: var(--brand, #0b5fff);
    font-size: 14px;
    font-weight: 600;
    text-decoration: underline;
}

.form1099-preview-actions {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.form1099-flag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 18px;
    margin-top: 14px;
}

.checkbox-field {
    align-items: center;
    display: flex;
    gap: 8px;
    margin: 0;
}

.checkbox-field input {
    width: auto;
}

.form1099-landing,
.form1099-hub,
.form1040-landing,
.form1040-hub,
.w2-landing,
.page-shell:has(#form1099-form),
.page-shell:has(#form1040-form),
.page-shell:has(.landing-hero),
.page-shell:has(.landing-section) {
    overflow-x: clip;
    width: 100%;
}

.form1099-landing img,
.form1099-hub img,
.form1040-landing img,
.form1040-hub img,
.w2-landing img,
.page-shell:has(.landing-hero) img,
.page-shell:has(.landing-section) img {
    height: auto;
    max-width: 100%;
}

.form1099-hero,
.form1099-hub-card,
.form1099-hub-card-link {
    min-width: 0;
}

.form1099-landing .page-title,
.form1099-hub .page-title,
.w2-landing .page-title,
#form1099-form .page-title {
    padding-inline: 0;
}

@media (max-width: 1024px) {
    .form1099-preview-wrap {
        min-height: 480px;
    }

    .form1099-preview-frame {
        height: min(70vh, 640px);
        min-height: 480px;
    }

    .form1099-hub-thumb img {
        aspect-ratio: 320 / 360;
    }

    .form1099-hero {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
        margin-bottom: 32px;
    }

    .form1099-hero-visual {
        order: -1;
        max-width: min(420px, 100%);
        margin-inline: auto;
        width: 100%;
    }

    .form1099-doc-frame {
        max-width: 100%;
        padding: 12px;
    }

    .form1099-hero-actions {
        justify-content: stretch;
    }

    .form1099-hero-actions .btn {
        flex: 1 1 calc(50% - 6px);
        min-width: 140px;
        text-align: center;
    }

    .form1099-lead {
        max-width: none;
    }

    .form1099-hub-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .page-shell:has(.landing-hero),
    .page-shell:has(.landing-section),
    .form1099-landing,
    .form1099-hub,
    .w2-landing {
        padding-inline: 16px;
    }

    .form1099-hero-actions .btn {
        flex: 1 1 100%;
    }

    .form1099-hero-copy {
        text-align: left;
    }

    .form1099-hero-meta {
        justify-content: flex-start;
    }

    .form1099-kicker {
        justify-content: flex-start;
        font-size: 12px;
    }

    .form1099-doc-frame {
        max-width: 100%;
        padding: 12px 12px 10px;
        width: 100%;
    }

    .form1099-flag-row {
        flex-direction: column;
        gap: 10px;
    }

    .form1099-preview-actions .btn {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .form1099-hero-copy h1 {
        font-size: clamp(26px, 8vw, 32px);
    }

    .form1099-preview-frame {
        height: min(65vh, 560px);
        min-height: 400px;
    }

    .form1099-preview-wrap {
        min-height: 400px;
    }

    .form1099-hub-grid {
        grid-template-columns: 1fr;
    }

    .form1099-hub-body {
        padding: 14px;
    }

    .landing-cta-band .landing-hero-actions {
        flex-direction: column;
    }

    .landing-cta-band .btn {
        width: 100%;
    }

    .landing-video-frame {
        border-radius: 12px;
    }
}

/* Payroll calculator */
.payroll-calculator-page {
    padding-top: 12px;
}

.calculator-hero {
    margin-bottom: 28px;
    max-width: 720px;
}

.calculator-hero h1 {
    color: var(--ink);
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 0 12px;
}

.calculator-hero-lead {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.65;
    margin: 0;
}

.calculator-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
}

.calculator-hero-meta li {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: var(--shadow);
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    padding: 7px 12px;
}

.calculator-layout {
    align-items: start;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
}

.calculator-settings {
    display: grid;
    gap: 18px;
}

.calculator-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.calculator-results {
    position: sticky;
    top: 100px;
}

.calculator-results-card .preview-card-body {
    padding: 18px;
}

.calculator-results-empty {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
    margin: 0 0 16px;
}

.calculator-results-body {
    margin-bottom: 16px;
}

.calc-net-banner {
    align-items: baseline;
    background: var(--brand-light);
    border: 1px solid rgba(var(--brand-rgb), 0.22);
    border-radius: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 14px 16px;
}

.calc-net-label {
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.calc-net-value {
    color: var(--ink);
    font-size: clamp(26px, 4vw, 32px);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.calc-breakdown {
    display: grid;
    gap: 0;
    margin: 0;
}

.calc-breakdown > div {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
}

.calc-breakdown > div:last-child {
    border-bottom: 0;
}

.calc-breakdown dt {
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.calc-breakdown dd {
    color: var(--ink);
    font-size: 15px;
    font-weight: 700;
    margin: 0;
}

.calc-employer-results {
    border-top: 1px solid var(--line);
    margin-top: 8px;
    padding-top: 12px;
}

.calc-employer-results h3 {
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 8px;
}

.calculator-cta-wrap {
    margin: 0;
}

.calc-benefit-rows {
    display: grid;
    gap: 12px;
}

.calc-benefit-row {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr) auto;
}

#calc-state-fields-section.is-loading .section-note {
    opacity: 0.75;
}

.status.info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

@media (max-width: 960px) {
    .calculator-layout {
        grid-template-columns: 1fr;
    }

    .calculator-results {
        position: static;
    }

    .calc-benefit-row {
        grid-template-columns: 1fr;
    }
}

/* Pay stub template gallery */
.template-gallery-hero {
    margin-bottom: 28px;
}

.template-gallery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 0 0 24px;
}

.template-gallery-filter {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 14px;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.template-gallery-filter:hover {
    border-color: rgba(var(--brand-rgb), 0.35);
    color: var(--ink);
}

.template-gallery-filter.is-active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.template-gallery-empty {
    color: var(--muted);
    margin: 0 0 16px;
    text-align: center;
}

.template-gallery-grid {
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.template-gallery-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.template-gallery-card:hover {
    border-color: rgba(var(--brand-rgb), 0.3);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}

.template-gallery-thumb-wrap {
    background: #f8fafc;
    border-bottom: 1px solid var(--line);
    padding: 16px 16px 8px;
}

.template-gallery-frame {
    margin: 0 auto;
    max-width: 100%;
}

.template-gallery-placeholder-body {
    align-items: center;
    background: linear-gradient(160deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 220px;
    padding: 20px;
    text-align: center;
}

.template-gallery-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.template-gallery-card-body h2 {
    font-size: 18px;
    margin: 4px 0 0;
}

.template-gallery-meta {
    color: var(--muted);
    font-size: 13px;
    margin: 6px 0 0 !important;
}

.template-gallery-card-body .landing-doc-cta {
    margin-top: auto;
}

.home-template-showcase {
    margin-top: 8px;
}

.home-template-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-template-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.home-template-thumb {
    background: #f8fafc;
    border-bottom: 1px solid var(--line);
    padding: 14px 14px 6px;
}

.home-template-frame {
    margin: 0 auto;
    max-width: 260px;
}

.home-template-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.home-template-card-body h3 {
    color: var(--ink);
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 12px;
}

.home-template-all {
    margin: 28px 0 0;
    text-align: center;
}

@media (max-width: 1024px) {
    .template-gallery-grid,
    .home-template-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .template-gallery-grid,
    .home-template-grid {
        grid-template-columns: 1fr;
    }
}

